summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorsaintlou@chromium.org <saintlou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-21 00:31:37 +0000
committersaintlou@chromium.org <saintlou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-21 00:31:37 +0000
commita2ddff0dc1e5df6ea8c6a82fb0eea4d9305eef3d (patch)
tree2e76cc95ed1af159789199d197fe4781c4c8f12b /chrome
parentb9fd49a8838234ff92236ad6fc36cc4dc5bb00b0 (diff)
downloadchromium_src-a2ddff0dc1e5df6ea8c6a82fb0eea4d9305eef3d.zip
chromium_src-a2ddff0dc1e5df6ea8c6a82fb0eea4d9305eef3d.tar.gz
chromium_src-a2ddff0dc1e5df6ea8c6a82fb0eea4d9305eef3d.tar.bz2
Remove unnecessary flags and code under CrOS.
Clean up of TOOLKIT_USES_GTK and USE_AURA. BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/9762006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127848 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/chromeos/chrome_browser_main_chromeos.cc62
-rw-r--r--chrome/browser/chromeos/chrome_browser_main_chromeos.h18
-rw-r--r--chrome/browser/chromeos/input_method/ibus_controller.cc45
-rw-r--r--chrome/browser/chromeos/input_method/ibus_ui_controller.cc8
-rw-r--r--chrome/browser/chromeos/input_method/input_method_manager.cc262
-rw-r--r--chrome/browser/chromeos/input_method/input_method_manager.h5
-rw-r--r--chrome/browser/chromeos/input_method/xkeyboard.cc10
-rw-r--r--chrome/browser/chromeos/input_method/xkeyboard_unittest.cc47
-rw-r--r--chrome/browser/chromeos/login/base_login_display_host.cc19
-rw-r--r--chrome/browser/chromeos/login/captive_portal_view.cc11
-rw-r--r--chrome/browser/chromeos/login/existing_user_controller.h4
-rw-r--r--chrome/browser/chromeos/login/language_switch_menu.cc33
-rw-r--r--chrome/browser/chromeos/login/login_utils.cc9
-rw-r--r--chrome/browser/chromeos/login/screen_locker_tester.cc9
-rw-r--r--chrome/browser/chromeos/login/version_info_updater.cc9
-rw-r--r--chrome/browser/chromeos/login/webui_login_display_host.cc19
-rw-r--r--chrome/browser/chromeos/login/webui_login_view.cc40
-rw-r--r--chrome/browser/chromeos/media/media_player.cc16
-rw-r--r--chrome/browser/chromeos/notifications/system_notification.cc7
-rw-r--r--chrome/browser/chromeos/notifications/system_notification.h5
-rw-r--r--chrome/browser/chromeos/status/input_method_menu.cc4
-rw-r--r--chrome/browser/chromeos/status/network_menu.cc4
-rw-r--r--chrome/browser/chromeos/status/status_area_view.cc2
-rw-r--r--chrome/browser/chromeos/system_key_event_listener.cc185
-rw-r--r--chrome/browser/chromeos/system_key_event_listener.h36
-rw-r--r--chrome/browser/chromeos/system_key_event_listener_browsertest.cc2
-rw-r--r--chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h19
27 files changed, 40 insertions, 850 deletions
diff --git a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
index f65b081..5fc248a 100644
--- a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
+++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
@@ -12,6 +12,7 @@
#include "base/message_loop.h"
#include "base/string_number_conversions.h"
#include "chrome/browser/browser_process_impl.h"
+#include "chrome/browser/chromeos/background/desktop_background_observer.h"
#include "chrome/browser/chromeos/audio/audio_handler.h"
#include "chrome/browser/chromeos/boot_times_loader.h"
#include "chrome/browser/chromeos/cros/cros_library.h"
@@ -27,6 +28,7 @@
#include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_helper.h"
#include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.h"
#include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.h"
+#include "chrome/browser/chromeos/legacy_window_manager/initial_browser_window_observer.h"
#include "chrome/browser/chromeos/login/authenticator.h"
#include "chrome/browser/chromeos/login/login_utils.h"
#include "chrome/browser/chromeos/login/ownership_service.h"
@@ -36,8 +38,11 @@
#include "chrome/browser/chromeos/net/cros_network_change_notifier_factory.h"
#include "chrome/browser/chromeos/net/network_change_notifier_chromeos.h"
#include "chrome/browser/chromeos/power/brightness_observer.h"
+#include "chrome/browser/chromeos/power/power_button_controller_delegate_chromeos.h"
+#include "chrome/browser/chromeos/power/power_button_observer.h"
#include "chrome/browser/chromeos/power/resume_observer.h"
#include "chrome/browser/chromeos/power/screen_lock_observer.h"
+#include "chrome/browser/chromeos/power/video_property_writer.h"
#include "chrome/browser/chromeos/status/status_area_view_chromeos.h"
#include "chrome/browser/chromeos/system/statistics_provider.h"
#include "chrome/browser/chromeos/system_key_event_listener.h"
@@ -64,23 +69,9 @@
#include "net/url_request/url_request.h"
#include "ui/base/l10n/l10n_util.h"
-#if defined(TOOLKIT_USES_GTK)
-#include <gtk/gtk.h>
-#endif
-#if defined(OS_CHROMEOS) && defined(USE_ASH)
-#include "chrome/browser/chromeos/background/desktop_background_observer.h"
-#endif
-
-#if defined(USE_AURA)
-#include "chrome/browser/chromeos/legacy_window_manager/initial_browser_window_observer.h"
-#include "chrome/browser/chromeos/power/power_button_controller_delegate_chromeos.h"
-#include "chrome/browser/chromeos/power/power_button_observer.h"
-#include "chrome/browser/chromeos/power/video_property_writer.h"
-#endif
class MessageLoopObserver : public MessageLoopForUI::Observer {
-#if defined(USE_AURA)
virtual base::EventStatus WillProcessEvent(
const base::NativeEvent& event) OVERRIDE {
return base::EVENT_CONTINUE;
@@ -89,34 +80,6 @@ class MessageLoopObserver : public MessageLoopForUI::Observer {
virtual void DidProcessEvent(
const base::NativeEvent& event) OVERRIDE {
}
-#else
- virtual void WillProcessEvent(GdkEvent* event) {
- // On chromeos we want to map Alt-left click to right click.
- // This code only changes presses and releases. We could decide to also
- // modify drags and crossings. It doesn't seem to be a problem right now
- // with our support for context menus (the only real need we have).
- // There are some inconsistent states both with what we have and what
- // we would get if we added drags. You could get a right drag without a
- // right down for example, unless we started synthesizing events, which
- // seems like more trouble than it's worth.
- if ((event->type == GDK_BUTTON_PRESS ||
- event->type == GDK_2BUTTON_PRESS ||
- event->type == GDK_3BUTTON_PRESS ||
- event->type == GDK_BUTTON_RELEASE) &&
- event->button.button == 1 &&
- event->button.state & GDK_MOD1_MASK) {
- // Change the button to the third (right) one.
- event->button.button = 3;
- // Remove the Alt key and first button state.
- event->button.state &= ~(GDK_MOD1_MASK | GDK_BUTTON1_MASK);
- // Add the third (right) button state.
- event->button.state |= GDK_BUTTON3_MASK;
- }
- }
-
- virtual void DidProcessEvent(GdkEvent* event) {
- }
-#endif
};
static base::LazyInstance<MessageLoopObserver> g_message_loop_observer =
@@ -317,10 +280,8 @@ void ChromeBrowserMainPartsChromeos::PostMainMessageLoopStart() {
GetXKeyboard()->SetNumLockEnabled(true);
#endif
-#if defined(USE_AURA)
initial_browser_window_observer_.reset(
new chromeos::InitialBrowserWindowObserver);
-#endif
}
ChromeBrowserMainPartsLinux::PostMainMessageLoopStart();
@@ -351,13 +312,6 @@ void ChromeBrowserMainPartsChromeos::PreProfileInit() {
// Now that the file thread exists we can record our stats.
chromeos::BootTimesLoader::Get()->RecordChromeMainStats();
-#if defined(TOOLKIT_USES_GTK)
- // Read locale-specific GTK resource information.
- std::string gtkrc = l10n_util::GetStringUTF8(IDS_LOCALE_GTKRC);
- if (!gtkrc.empty())
- gtk_rc_parse_string(gtkrc.c_str());
-#endif
-
// Trigger prefetching of ownership status.
chromeos::OwnershipService::GetSharedInstance()->Prewarm();
@@ -413,11 +367,9 @@ void ChromeBrowserMainPartsChromeos::PreProfileInit() {
// In Aura builds this will initialize ash::Shell.
ChromeBrowserMainPartsLinux::PreProfileInit();
-#if defined(OS_CHROMEOS) && defined(USE_ASH)
// Initialize desktop background observer so that it can receive
// LOGIN_USER_CHANGED notification from UserManager.
desktop_background_observer_.reset(new chromeos::DesktopBackgroundObserver);
-#endif
}
void ChromeBrowserMainPartsChromeos::PostProfileInit() {
@@ -486,12 +438,10 @@ void ChromeBrowserMainPartsChromeos::PostBrowserStart() {
// on the background FILE thread.
chromeos::system::StatisticsProvider::GetInstance();
-#if defined(USE_AURA)
// These are dependent on the ash::Shell singleton already having been
// initialized.
power_button_observer_.reset(new chromeos::PowerButtonObserver);
video_property_writer_.reset(new chromeos::VideoPropertyWriter);
-#endif
ChromeBrowserMainPartsLinux::PostBrowserStart();
}
@@ -538,14 +488,12 @@ void ChromeBrowserMainPartsChromeos::PostMainMessageLoopRun() {
chromeos::WebSocketProxyController::Shutdown();
-#if defined(USE_AURA)
// Let VideoPropertyWriter unregister itself as an observer of the ash::Shell
// singleton before the shell is destroyed.
video_property_writer_.reset();
// Remove PowerButtonObserver attached to a D-Bus client before
// DBusThreadManager is shut down.
power_button_observer_.reset();
-#endif
ChromeBrowserMainPartsLinux::PostMainMessageLoopRun();
}
diff --git a/chrome/browser/chromeos/chrome_browser_main_chromeos.h b/chrome/browser/chromeos/chrome_browser_main_chromeos.h
index 765990b..40367c7 100644
--- a/chrome/browser/chromeos/chrome_browser_main_chromeos.h
+++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.h
@@ -10,19 +10,13 @@
namespace chromeos {
class BrightnessObserver;
-class ResumeObserver;
-class ScreenLockObserver;
-class SessionManagerObserver;
-
-#if defined(OS_CHROMEOS) && defined(USE_ASH)
class DesktopBackgroundObserver;
-#endif
-
-#if defined(USE_AURA)
class InitialBrowserWindowObserver;
class PowerButtonObserver;
+class ResumeObserver;
+class ScreenLockObserver;
+class SessionManagerObserver;
class VideoPropertyWriter;
-#endif
} // namespace chromeos
class ChromeBrowserMainPartsChromeos : public ChromeBrowserMainPartsLinux {
@@ -50,17 +44,11 @@ class ChromeBrowserMainPartsChromeos : public ChromeBrowserMainPartsLinux {
scoped_ptr<chromeos::ResumeObserver> resume_observer_;
scoped_ptr<chromeos::ScreenLockObserver> screen_lock_observer_;
scoped_ptr<chromeos::SessionManagerObserver> session_manager_observer_;
-
-#if defined(OS_CHROMEOS) && defined(USE_ASH)
scoped_ptr<chromeos::DesktopBackgroundObserver> desktop_background_observer_;
-#endif
-
-#if defined(USE_AURA)
scoped_ptr<chromeos::InitialBrowserWindowObserver>
initial_browser_window_observer_;
scoped_ptr<chromeos::PowerButtonObserver> power_button_observer_;
scoped_ptr<chromeos::VideoPropertyWriter> video_property_writer_;
-#endif
DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainPartsChromeos);
};
diff --git a/chrome/browser/chromeos/input_method/ibus_controller.cc b/chrome/browser/chromeos/input_method/ibus_controller.cc
index 82ae81a..e7140259 100644
--- a/chrome/browser/chromeos/input_method/ibus_controller.cc
+++ b/chrome/browser/chromeos/input_method/ibus_controller.cc
@@ -363,13 +363,6 @@ class IBusControllerImpl : public IBusController {
ibus_,
reinterpret_cast<gpointer>(G_CALLBACK(IBusBusDisconnectedThunk)),
this);
-#if !defined(USE_AURA)
- g_signal_handlers_disconnect_by_func(
- ibus_,
- reinterpret_cast<gpointer>(
- G_CALLBACK(IBusBusGlobalEngineChangedThunk)),
- this);
-#endif
g_signal_handlers_disconnect_by_func(
ibus_,
reinterpret_cast<gpointer>(G_CALLBACK(IBusBusNameOwnerChangedThunk)),
@@ -457,9 +450,7 @@ class IBusControllerImpl : public IBusController {
// IBusController override.
virtual bool ChangeInputMethod(const std::string& name) {
-#if defined(USE_AURA)
DCHECK(!InputMethodUtil::IsKeyboardLayout(name));
-#endif
if (!IBusConnectionsAreAlive()) {
LOG(ERROR) << "ChangeInputMethod: IBus connection is not alive";
@@ -490,9 +481,7 @@ class IBusControllerImpl : public IBusController {
NULL, // callback
NULL); // user_data
-#if defined(USE_AURA)
UpdateUI(name.c_str());
-#endif
return true;
}
@@ -650,15 +639,6 @@ class IBusControllerImpl : public IBusController {
->IBusBusDisconnected(sender);
}
-#if !defined(USE_AURA)
- static void IBusBusGlobalEngineChangedThunk(IBusBus* sender,
- const gchar* engine_name,
- gpointer userdata) {
- return reinterpret_cast<IBusControllerImpl*>(userdata)
- ->IBusBusGlobalEngineChanged(sender, engine_name);
- }
-#endif
-
static void IBusBusNameOwnerChangedThunk(IBusBus* sender,
const gchar* name,
const gchar* old_name,
@@ -730,11 +710,6 @@ class IBusControllerImpl : public IBusController {
// Ask libibus to watch the NameOwnerChanged signal *asynchronously*.
ibus_bus_set_watch_dbus_signal(ibus_, TRUE);
-#if !defined(USE_AURA)
- // Ask libibus to watch the GlobalEngineChanged signal *asynchronously*.
- ibus_bus_set_watch_ibus_signal(ibus_, TRUE);
-#endif
-
if (ibus_bus_is_connected(ibus_)) {
VLOG(1) << "IBus connection is ready.";
}
@@ -885,13 +860,6 @@ class IBusControllerImpl : public IBusController {
G_CALLBACK(IBusBusDisconnectedThunk),
this);
-#if !defined(USE_AURA)
- g_signal_connect(ibus_,
- "global-engine-changed",
- G_CALLBACK(IBusBusGlobalEngineChangedThunk),
- this);
-#endif
-
g_signal_connect(ibus_,
"name-owner-changed",
G_CALLBACK(IBusBusNameOwnerChangedThunk),
@@ -944,15 +912,6 @@ class IBusControllerImpl : public IBusController {
FOR_EACH_OBSERVER(Observer, observers_, OnConnectionChange(false));
}
-#if !defined(USE_AURA)
- // Handles "global-engine-changed" signal from ibus-daemon.
- void IBusBusGlobalEngineChanged(IBusBus* bus, const gchar* engine_name) {
- DCHECK(engine_name);
- VLOG(1) << "Global engine is changed to " << engine_name;
- UpdateUI(engine_name);
- }
-#endif
-
// Handles "name-owner-changed" signal from ibus-daemon. The signal is sent
// to libcros when an IBus component such as ibus-memconf, ibus-engine-*, ..
// is started.
@@ -1040,13 +999,9 @@ class IBusControllerImpl : public IBusController {
for (size_t i = 0; i < requested_input_methods.size(); ++i) {
const std::string& input_method = requested_input_methods[i];
if (whitelist_.InputMethodIdIsWhitelisted(input_method.c_str())) {
-#if defined(USE_AURA)
if (!InputMethodUtil::IsKeyboardLayout(input_method)) {
out_filtered_input_methods->push_back(input_method);
}
-#else
- out_filtered_input_methods->push_back(input_method);
-#endif
} else {
LOG(ERROR) << "Unsupported input method: " << input_method;
}
diff --git a/chrome/browser/chromeos/input_method/ibus_ui_controller.cc b/chrome/browser/chromeos/input_method/ibus_ui_controller.cc
index 6b49131..0da8a3b 100644
--- a/chrome/browser/chromeos/input_method/ibus_ui_controller.cc
+++ b/chrome/browser/chromeos/input_method/ibus_ui_controller.cc
@@ -14,7 +14,7 @@
#include "base/string_util.h"
#include "third_party/mozc/session/candidates_lite.pb.h"
-#if defined(HAVE_IBUS) && defined(USE_AURA)
+#if defined(HAVE_IBUS)
#include "ash/shell.h"
#include "chrome/browser/chromeos/input_method/input_method_manager.h"
#include "chrome/browser/chromeos/input_method/input_method_util.h"
@@ -88,16 +88,13 @@ class IBusUiControllerImpl : public IBusUiController {
IBusUiControllerImpl()
: ibus_(NULL),
ibus_panel_service_(NULL) {
-#if defined(USE_AURA)
ui::InputMethodIBus* input_method = GetChromeInputMethod();
DCHECK(input_method);
input_method->set_ibus_client(scoped_ptr<ui::internal::IBusClient>(
new IBusChromeOSClientImpl(this)).Pass());
-#endif // USE_AURA
}
~IBusUiControllerImpl() {
-#if defined(USE_AURA)
ui::InputMethodIBus* input_method = GetChromeInputMethod();
if (input_method) {
ui::internal::IBusClient* client = input_method->ibus_client();
@@ -105,7 +102,6 @@ class IBusUiControllerImpl : public IBusUiController {
DCHECK(client);
static_cast<IBusChromeOSClientImpl*>(client)->set_ui(NULL);
}
-#endif // USE_AURA
// ibus_panel_service_ depends on ibus_, thus unref it first.
if (ibus_panel_service_) {
DisconnectPanelServiceSignals();
@@ -279,7 +275,6 @@ class IBusUiControllerImpl : public IBusUiController {
}
private:
-#if defined(USE_AURA)
// A class for customizing the behavior of ui::InputMethodIBus for Chrome OS.
class IBusChromeOSClientImpl : public ui::internal::IBusClientImpl {
public:
@@ -338,7 +333,6 @@ class IBusUiControllerImpl : public IBusUiController {
ash::Shell::GetRootWindow()->GetProperty(
aura::client::kRootWindowInputMethodKey));
}
-#endif // USE_AURA
// Functions that end with Thunk are used to deal with glib callbacks.
//
diff --git a/chrome/browser/chromeos/input_method/input_method_manager.cc b/chrome/browser/chromeos/input_method/input_method_manager.cc
index f946296..b0fd60c 100644
--- a/chrome/browser/chromeos/input_method/input_method_manager.cc
+++ b/chrome/browser/chromeos/input_method/input_method_manager.cc
@@ -35,82 +35,12 @@
#include "chrome/browser/chromeos/input_method/candidate_window.h"
#endif
-#if !defined(USE_AURA)
-#include "chrome/browser/chromeos/input_method/hotkey_manager.h"
-#include <X11/X.h> // ShiftMask, ControlMask, etc.
-#include <X11/Xutil.h> // for XK_* macros.
-#endif
-
using content::BrowserThread;
namespace {
const char kIBusDaemonPath[] = "/usr/bin/ibus-daemon";
-#if !defined(USE_AURA)
-const size_t kMaxInputMethodsPerHotkey = 2;
-
-// For hotkey handling.
-enum HotkeyEvent {
- // Global hotkeys.
- kPreviousInputMethod = 0,
- kNextInputMethod,
- // Input method specific hotkeys.
- kJapaneseInputMethod,
- kJapaneseLayout,
- kJapaneseInputMethodOrLayout,
- kKoreanInputMethodOrLayout,
-};
-
-// Details of the input method specific hotkeys.
-const struct InputMethodSpecificHotkeySetting {
- const char* input_method_ids[kMaxInputMethodsPerHotkey];
- int event_id;
- KeySym keysym;
- uint32 modifiers;
- bool trigger_on_press; // if true. false means 'trigger on release'.
-} kInputMethodSpecificHotkeySettings[] = {
- {
- { "mozc-jp" },
- kJapaneseInputMethod,
- XK_Henkan,
- 0x0,
- true,
- },
- {
- { "xkb:jp::jpn" },
- kJapaneseLayout,
- XK_Muhenkan,
- 0x0,
- true,
- },
- {
- { "mozc-jp", "xkb:jp::jpn" },
- kJapaneseInputMethodOrLayout,
- XK_Zenkaku_Hankaku,
- 0x0,
- true,
- },
- {
- { "mozc-hangul", "xkb:kr:kr104:kor" },
- kKoreanInputMethodOrLayout,
- XK_Hangul,
- 0x0,
- true,
- },
- {
- { "mozc-hangul", "xkb:kr:kr104:kor" },
- kKoreanInputMethodOrLayout,
- XK_space,
- ShiftMask,
- true,
- },
-};
-
-const size_t kInputMethodSpecificHotkeySettingsLen =
- arraysize(kInputMethodSpecificHotkeySettings);
-#endif
-
// Finds a property which has |new_prop.key| from |prop_list|, and replaces the
// property with |new_prop|. Returns true if such a property is found.
bool FindAndUpdateProperty(
@@ -137,11 +67,7 @@ namespace input_method {
// The implementation of InputMethodManager.
class InputMethodManagerImpl
- :
-#if !defined(USE_AURA)
- public HotkeyManager::Observer,
-#endif
- public InputMethodManager,
+ : public InputMethodManager,
public content::NotificationObserver,
#if !defined(USE_VIRTUAL_KEYBOARD)
public CandidateWindowController::Observer,
@@ -174,31 +100,10 @@ class InputMethodManagerImpl
ibus_controller_->AddObserver(this);
ibus_controller_->Connect();
-#if !defined(USE_AURA)
- // Initialize extra_hotkeys_.
- for (size_t i = 0; i < kInputMethodSpecificHotkeySettingsLen; ++i) {
- const char* const* input_method_ids =
- kInputMethodSpecificHotkeySettings[i].input_method_ids;
- for (size_t j = 0;
- j < kMaxInputMethodsPerHotkey && input_method_ids[j];
- ++j) {
- extra_hotkeys_.insert(std::make_pair(
- input_method_ids[j], &kInputMethodSpecificHotkeySettings[i]));
- }
- }
-#endif
-
EnableHotkeys();
-
-#if !defined(USE_AURA)
- hotkey_manager_.AddObserver(this);
-#endif
}
virtual ~InputMethodManagerImpl() {
-#if !defined(USE_AURA)
- hotkey_manager_.RemoveObserver(this);
-#endif
ibus_controller_->RemoveObserver(this);
#if !defined(USE_VIRTUAL_KEYBOARD)
if (candidate_window_controller_.get())
@@ -306,13 +211,7 @@ class InputMethodManagerImpl
// FlushImeConfig() for details.
tentative_current_input_method_id_ = input_method_id;
- if (InputMethodUtil::IsKeyboardLayout(input_method_id)
-#if !defined(USE_AURA)
- // TODO(yusukes): Remove this code when R18 stable is shipped.
- // crosbug.com/26245
- && ibus_daemon_process_handle_ == base::kNullProcessHandle
-#endif
- ) {
+ if (InputMethodUtil::IsKeyboardLayout(input_method_id)) {
// We shouldn't use SetCurrentKeyboardLayoutByName() here. See
// comments at ChangeCurrentInputMethod() for details.
ChangeCurrentInputMethodFromId(input_method_id);
@@ -413,9 +312,6 @@ class InputMethodManagerImpl
ix != extra_input_method_ids_.end(); ++ix) {
active_input_method_ids_.push_back(ix->first);
}
-#if !defined(USE_AURA)
- UpdateInputMethodSpecificHotkeys();
-#endif
}
// Before calling FlushImeConfig(), start input method process if necessary.
@@ -551,30 +447,7 @@ class InputMethodManagerImpl
return xkeyboard_.get();
}
-#if !defined(USE_AURA)
- virtual HotkeyManager* GetHotkeyManager() {
- return &hotkey_manager_;
- }
-#endif
-
virtual void HotkeyPressed(HotkeyManager* manager, int event_id) {
-#if !defined(USE_AURA)
- const HotkeyEvent event = HotkeyEvent(event_id);
- switch (event) {
- case kNextInputMethod:
- SwitchToNextInputMethod();
- break;
- case kPreviousInputMethod:
- SwitchToPreviousInputMethod();
- break;
- case kJapaneseInputMethod:
- case kJapaneseLayout:
- case kJapaneseInputMethodOrLayout:
- case kKoreanInputMethodOrLayout:
- SwitchToInputMethod(event);
- break;
- }
-#endif
}
virtual void CandidateWindowOpened() {
@@ -720,44 +593,11 @@ class InputMethodManagerImpl
}
virtual void EnableHotkeys() {
-#if defined(USE_AURA)
ignore_hotkeys_ = false;
-#else
- // Add Ctrl+space.
- hotkey_manager_.AddHotkey(kPreviousInputMethod,
- XK_space,
- ControlMask,
- true /* trigger on key press */);
-
- // Add Alt+Shift. For this hotkey, we use "trigger on key release" so that
- // the current IME is not changed on pressing Alt+Shift+something.
- hotkey_manager_.AddHotkey(kNextInputMethod,
- XK_Shift_L,
- ShiftMask | Mod1Mask,
- false /* trigger on key release. */);
- hotkey_manager_.AddHotkey(kNextInputMethod,
- XK_Shift_R,
- ShiftMask | Mod1Mask,
- false);
- hotkey_manager_.AddHotkey(kNextInputMethod,
- XK_Meta_L,
- ShiftMask | Mod1Mask,
- false);
- hotkey_manager_.AddHotkey(kNextInputMethod,
- XK_Meta_R,
- ShiftMask | Mod1Mask,
- false);
- // Input method specific hotkeys will be added in SetInputMethodConfig().
-#endif
}
virtual void DisableHotkeys() {
-#if defined(USE_AURA)
ignore_hotkeys_ = true;
-#else
- hotkey_manager_.RemoveHotkey(kPreviousInputMethod);
- hotkey_manager_.RemoveHotkey(kNextInputMethod);
-#endif
}
static InputMethodManagerImpl* GetInstance() {
@@ -1363,92 +1203,6 @@ class InputMethodManagerImpl
}
}
-#if !defined(USE_AURA)
- void UpdateInputMethodSpecificHotkeys() {
- // Remove all input method specific hotkeys first.
- for (size_t i = 0; i < kInputMethodSpecificHotkeySettingsLen; ++i) {
- hotkey_manager_.RemoveHotkey(
- kInputMethodSpecificHotkeySettings[i].event_id);
- }
-
- for (size_t i = 0; i < active_input_method_ids_.size(); ++i) {
- typedef std::map<std::string,
- const InputMethodSpecificHotkeySetting*>::const_iterator Iter;
- std::pair<Iter, Iter> result = extra_hotkeys_.equal_range(
- active_input_method_ids_[i]);
- for (Iter iter = result.first; iter != result.second; ++iter) {
- hotkey_manager_.AddHotkey(iter->second->event_id,
- iter->second->keysym,
- iter->second->modifiers,
- iter->second->trigger_on_press);
- }
- }
- }
-
- // Handles input method specific hotkeys like XK_Henkan.
- void SwitchToInputMethod(HotkeyEvent event) {
- // Sanity check.
- if (active_input_method_ids_.empty()) {
- LOG(ERROR) << "active input method is empty";
- return;
- }
-
- // Get the list of input method ids for |event_id|. For example, get
- // { "mozc-hangul", "xkb:kr:kr104:kor" } for kKoreanInputMethodOrLayout.
- const char* const* input_method_ids_to_switch = NULL;
- switch (event) {
- case kPreviousInputMethod:
- case kNextInputMethod:
- // These events should not be handled here.
- break;
- case kJapaneseInputMethod:
- case kJapaneseLayout:
- case kJapaneseInputMethodOrLayout:
- case kKoreanInputMethodOrLayout:
- for (size_t i = 0; i < kInputMethodSpecificHotkeySettingsLen; ++i) {
- if (event == kInputMethodSpecificHotkeySettings[i].event_id) {
- input_method_ids_to_switch =
- kInputMethodSpecificHotkeySettings[i].input_method_ids;
- }
- }
- break;
- }
- if (!input_method_ids_to_switch) {
- LOG(ERROR) << "Unknown event: " << event;
- return;
- }
-
- // Obtain the intersection of input_method_ids_to_switch and
- // active_input_method_ids_. The order of IDs in active_input_method_ids_ is
- // preserved.
- std::vector<std::string> ids;
- for (size_t i = 0; i < kMaxInputMethodsPerHotkey; ++i) {
- const char* id = input_method_ids_to_switch[i];
- if (id && std::find(active_input_method_ids_.begin(),
- active_input_method_ids_.end(),
- id) != active_input_method_ids_.end()) {
- ids.push_back(id);
- }
- }
- if (ids.empty()) {
- LOG(ERROR) << "No input method for " << event << " is active";
- return;
- }
-
- // If current_input_method_ is not in ids, switch to ids[0]. If
- // current_input_method_ is ids[N], switch to ids[N+1].
- std::vector<std::string>::const_iterator iter =
- std::find(ids.begin(), ids.end(), current_input_method_.id());
- if (iter != ids.end()) {
- ++iter;
- }
- if (iter == ids.end()) {
- iter = ids.begin();
- }
- ChangeInputMethod(*iter);
- }
-#endif
-
// The IBus controller is used to control the input method status and
// allow allow callbacks when the input method status changes.
scoped_ptr<IBusController> ibus_controller_;
@@ -1521,13 +1275,6 @@ class InputMethodManagerImpl
// those created by extension.
std::map<std::string, InputMethodDescriptor> extra_input_method_ids_;
-#if !defined(USE_AURA)
- // A muitlmap from input method id to input method specific hotkey
- // information. e.g. "mozc-jp" to XK_ZenkakuHankaku, "mozc-jp" to XK_Henkan.
- std::multimap<std::string,
- const InputMethodSpecificHotkeySetting*> extra_hotkeys_;
-#endif
-
InputMethodWhitelist whitelist_;
// An object which provides miscellaneous input method utility functions. Note
@@ -1538,11 +1285,6 @@ class InputMethodManagerImpl
// auto-repeat interval.
scoped_ptr<XKeyboard> xkeyboard_;
-#if !defined(USE_AURA)
- // An object which detects Control+space and Shift+Alt key presses.
- HotkeyManager hotkey_manager_;
-#endif
-
// true when DisableHotkeys() is called to temporarily disable IME hotkeys.
// EnableHotkeys() resets the flag to the default value, false.
bool ignore_hotkeys_;
diff --git a/chrome/browser/chromeos/input_method/input_method_manager.h b/chrome/browser/chromeos/input_method/input_method_manager.h
index 5aa3114..3596e34 100644
--- a/chrome/browser/chromeos/input_method/input_method_manager.h
+++ b/chrome/browser/chromeos/input_method/input_method_manager.h
@@ -248,11 +248,6 @@ class InputMethodManager {
// Returns a InputMethodUtil object.
virtual InputMethodUtil* GetInputMethodUtil() = 0;
-#if !defined(USE_AURA)
- // Returns a hotkey manager object which could be used to detect Control+space
- // and Shift+Alt key presses.
- virtual HotkeyManager* GetHotkeyManager() = 0;
-#endif
// Enable all input method hotkeys.
virtual void EnableHotkeys() = 0;
// Disable all input method hotkeys.
diff --git a/chrome/browser/chromeos/input_method/xkeyboard.cc b/chrome/browser/chromeos/input_method/xkeyboard.cc
index 361246ab..9f7143e 100644
--- a/chrome/browser/chromeos/input_method/xkeyboard.cc
+++ b/chrome/browser/chromeos/input_method/xkeyboard.cc
@@ -130,14 +130,11 @@ XKeyboardImpl::XKeyboardImpl(const InputMethodUtil& util)
: is_running_on_chrome_os_(base::chromeos::IsRunningOnChromeOS()) {
num_lock_mask_ = GetNumLockMask();
-#if defined(USE_AURA)
// web_input_event_aurax11.cc seems to assume that Mod2Mask is always assigned
// to Num Lock.
// TODO(yusukes): Check the assumption is really okay. If not, modify the Aura
// code, and then remove the CHECK below.
CHECK(!is_running_on_chrome_os_ || (num_lock_mask_ == Mod2Mask));
-#endif
-
GetLockedModifiers(&current_caps_lock_status_, &current_num_lock_status_);
for (size_t i = 0; i < arraysize(kCustomizableKeys); ++i) {
@@ -378,13 +375,6 @@ std::string XKeyboardImpl::CreateFullXkbLayoutName(
use_left_alt_key_as_str.c_str(),
(KeepRightAlt(layout_name) ? "_keepralt" : ""));
-#if !defined(USE_AURA)
- if ((full_xkb_layout_name.substr(0, 3) != "us+") &&
- (full_xkb_layout_name.substr(0, 3) != "us(")) {
- full_xkb_layout_name += ",us";
- }
-#endif
-
return full_xkb_layout_name;
}
diff --git a/chrome/browser/chromeos/input_method/xkeyboard_unittest.cc b/chrome/browser/chromeos/input_method/xkeyboard_unittest.cc
index 254e07e..b78d13f 100644
--- a/chrome/browser/chromeos/input_method/xkeyboard_unittest.cc
+++ b/chrome/browser/chromeos/input_method/xkeyboard_unittest.cc
@@ -149,11 +149,8 @@ TEST_F(XKeyboardTest, TestCreateFullXkbLayoutNameBasic) {
"us!", GetMap(kVoidKey, kVoidKey, kVoidKey)).c_str());
EXPECT_STREQ("", xkey_->CreateFullXkbLayoutName(
"us; /bin/sh", GetMap(kVoidKey, kVoidKey, kVoidKey)).c_str());
- EXPECT_STREQ("ab-c_12+chromeos(disabled_disabled_disabled)"
-#if !defined(USE_AURA)
- ",us"
-#endif
- , xkey_->CreateFullXkbLayoutName(
+ EXPECT_STREQ("ab-c_12+chromeos(disabled_disabled_disabled)",
+ xkey_->CreateFullXkbLayoutName(
"ab-c_12",
GetMap(kVoidKey, kVoidKey, kVoidKey)).c_str());
@@ -180,25 +177,10 @@ TEST_F(XKeyboardTest, TestCreateFullXkbLayoutNameBasic) {
xkey_->CreateFullXkbLayoutName(
"us(dvorak)",
GetMap(kVoidKey, kVoidKey, kVoidKey)).c_str());
- EXPECT_STREQ("jp+chromeos(disabled_disabled_disabled)"
-#if !defined(USE_AURA)
- ",us"
-#endif
- , xkey_->CreateFullXkbLayoutName(
+ EXPECT_STREQ("jp+chromeos(disabled_disabled_disabled)",
+ xkey_->CreateFullXkbLayoutName(
"jp", // does not use AltGr, therefore no _keepralt.
GetMap(kVoidKey, kVoidKey, kVoidKey)).c_str());
-
-#if !defined(USE_AURA)
- // When the layout name is not "us", the second layout should be added.
- EXPECT_EQ(std::string::npos, xkey_->CreateFullXkbLayoutName(
- "us", GetMap(kVoidKey, kVoidKey, kVoidKey)).find(",us"));
- EXPECT_EQ(std::string::npos, xkey_->CreateFullXkbLayoutName(
- "us(dvorak)", GetMap(kVoidKey, kVoidKey, kVoidKey)).find(",us"));
- EXPECT_NE(std::string::npos, xkey_->CreateFullXkbLayoutName(
- "gb(extd)", GetMap(kVoidKey, kVoidKey, kVoidKey)).find(",us"));
- EXPECT_NE(std::string::npos, xkey_->CreateFullXkbLayoutName(
- "jp", GetMap(kVoidKey, kVoidKey, kVoidKey)).find(",us"));
-#endif
}
TEST_F(XKeyboardTest, TestCreateFullXkbLayoutNameKeepCapsLock) {
@@ -207,20 +189,14 @@ TEST_F(XKeyboardTest, TestCreateFullXkbLayoutNameKeepCapsLock) {
"us(colemak)",
// The 1st kVoidKey should be ignored.
GetMap(kVoidKey, kVoidKey, kVoidKey)).c_str());
- EXPECT_STREQ("de(neo)+chromeos(search_leftcontrol_leftcontrol_keepralt)"
-#if !defined(USE_AURA)
- ",us"
-#endif
- , xkey_->CreateFullXkbLayoutName(
+ EXPECT_STREQ("de(neo)+chromeos(search_leftcontrol_leftcontrol_keepralt)",
+ xkey_->CreateFullXkbLayoutName(
// The 1st kLeftControlKey should be ignored.
"de(neo)", GetMap(kLeftControlKey,
kLeftControlKey,
kLeftControlKey)).c_str());
- EXPECT_STREQ("gb(extd)+chromeos(disabled_disabled_disabled_keepralt)"
-#if !defined(USE_AURA)
- ",us"
-#endif
- , xkey_->CreateFullXkbLayoutName(
+ EXPECT_STREQ("gb(extd)+chromeos(disabled_disabled_disabled_keepralt)",
+ xkey_->CreateFullXkbLayoutName(
"gb(extd)",
GetMap(kVoidKey, kVoidKey, kVoidKey)).c_str());
}
@@ -230,11 +206,8 @@ TEST_F(XKeyboardTest, TestCreateFullXkbLayoutNameKeepAlt) {
xkey_->CreateFullXkbLayoutName(
"us(intl)", GetMap(kVoidKey, kVoidKey, kVoidKey)).c_str());
EXPECT_STREQ("kr(kr104)+"
- "chromeos(leftcontrol_leftcontrol_leftcontrol_keepralt)"
-#if !defined(USE_AURA)
- ",us"
-#endif
- , xkey_->CreateFullXkbLayoutName(
+ "chromeos(leftcontrol_leftcontrol_leftcontrol_keepralt)",
+ xkey_->CreateFullXkbLayoutName(
"kr(kr104)", GetMap(kLeftControlKey,
kLeftControlKey,
kLeftControlKey)).c_str());
diff --git a/chrome/browser/chromeos/login/base_login_display_host.cc b/chrome/browser/chromeos/login/base_login_display_host.cc
index da9d08e..4023d95 100644
--- a/chrome/browser/chromeos/login/base_login_display_host.cc
+++ b/chrome/browser/chromeos/login/base_login_display_host.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/chromeos/login/base_login_display_host.h"
+#include "ash/shell.h"
+#include "ash/shell_window_ids.h"
#include "base/bind.h"
#include "base/command_line.h"
#include "base/file_util.h"
@@ -37,22 +39,17 @@
#include "content/public/browser/notification_types.h"
#include "googleurl/src/gurl.h"
#include "third_party/cros_system_api/window_manager/chromeos_wm_ipc_enums.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/rect.h"
-#include "unicode/timezone.h"
-
-#if defined(USE_AURA)
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
#include "ui/aura/window.h"
+#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/compositor/layer.h"
#include "ui/gfx/compositor/layer_animation_element.h"
#include "ui/gfx/compositor/layer_animation_sequence.h"
#include "ui/gfx/compositor/layer_animator.h"
#include "ui/gfx/compositor/scoped_layer_animation_settings.h"
#include "ui/gfx/transform.h"
+#include "ui/gfx/rect.h"
#include "ui/views/widget/widget.h"
-#endif
+#include "unicode/timezone.h"
namespace {
@@ -116,11 +113,9 @@ void DetermineAndSaveHardwareKeyboard(const std::string& locale,
}
}
-#if defined(USE_AURA)
ui::Layer* GetLayer(views::Widget* widget) {
return widget->GetNativeView()->layer();
}
-#endif
} // namespace
@@ -173,9 +168,7 @@ void BaseLoginDisplayHost::OnSessionStart() {
DVLOG(1) << "Session starting";
// Display host is deleted once animation is completed
// since sign in screen widget has to stay alive.
-#if defined(USE_AURA)
StartAnimation();
-#endif
ShutdownDisplayHost(false);
}
@@ -295,7 +288,6 @@ void BaseLoginDisplayHost::ShutdownDisplayHost(bool post_quit_task) {
}
void BaseLoginDisplayHost::StartAnimation() {
-#if defined(USE_AURA)
if (ash::Shell::GetInstance()->GetContainer(
ash::internal::kShellWindowId_DesktopBackgroundContainer)->
children().empty()) {
@@ -398,7 +390,6 @@ void BaseLoginDisplayHost::StartAnimation() {
default_container_layer->SetTransform(ui::Transform());
}
}
-#endif
}
void BaseLoginDisplayHost::OnOwnershipStatusCheckDone(
diff --git a/chrome/browser/chromeos/login/captive_portal_view.cc b/chrome/browser/chromeos/login/captive_portal_view.cc
index e6853a1..8eebf16 100644
--- a/chrome/browser/chromeos/login/captive_portal_view.cc
+++ b/chrome/browser/chromeos/login/captive_portal_view.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/chromeos/login/captive_portal_view.h"
+#include "ash/shell.h"
+#include "ash/shell_window_ids.h"
#include "base/message_loop.h"
#include "base/utf_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
@@ -33,11 +35,6 @@
#include "ui/views/view.h"
#include "ui/views/widget/widget.h"
-#if defined(USE_AURA)
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#endif
-
using content::WebContents;
using views::GridLayout;
@@ -319,7 +316,6 @@ void CaptivePortalView::ShowPageInfo(content::WebContents* web_contents,
const GURL& url,
const content::SSLStatus& ssl,
bool show_history) {
-#if defined(USE_AURA)
PageInfoBubbleView* page_info_bubble =
new PageInfoBubbleView(
location_bar_->location_icon_view(),
@@ -330,9 +326,6 @@ void CaptivePortalView::ShowPageInfo(content::WebContents* web_contents,
ash::internal::kShellWindowId_LockSystemModalContainer));
CreateViewsBubble(page_info_bubble);
page_info_bubble->Show();
-#else
- NOTIMPLEMENTED();
-#endif
}
PageActionImageView* CaptivePortalView::CreatePageActionImageView(
diff --git a/chrome/browser/chromeos/login/existing_user_controller.h b/chrome/browser/chromeos/login/existing_user_controller.h
index b8da999..f3d6f5e 100644
--- a/chrome/browser/chromeos/login/existing_user_controller.h
+++ b/chrome/browser/chromeos/login/existing_user_controller.h
@@ -27,10 +27,6 @@
#include "googleurl/src/gurl.h"
#include "ui/gfx/rect.h"
-#if defined(TOOLKIT_USES_GTK)
-#include "chrome/browser/chromeos/legacy_window_manager/wm_message_listener.h"
-#endif
-
namespace chromeos {
class LoginDisplayHost;
diff --git a/chrome/browser/chromeos/login/language_switch_menu.cc b/chrome/browser/chromeos/login/language_switch_menu.cc
index efe34bd..8a19ad4 100644
--- a/chrome/browser/chromeos/login/language_switch_menu.cc
+++ b/chrome/browser/chromeos/login/language_switch_menu.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/chromeos/login/language_switch_menu.h"
+#include "ash/shell.h"
#include "base/i18n/rtl.h"
#include "base/threading/thread_restrictions.h"
#include "base/utf_string_conversions.h"
@@ -19,6 +20,7 @@
#include "chrome/common/pref_names.h"
#include "grit/generated_resources.h"
#include "grit/platform_locale_settings.h"
+#include "ui/aura/root_window.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/platform_font_pango.h"
@@ -28,11 +30,6 @@
#include "ui/views/controls/menu/submenu_view.h"
#include "ui/views/widget/widget.h"
-#if defined(USE_AURA)
-#include "ash/shell.h"
-#include "ui/aura/root_window.h"
-#endif
-
namespace {
const int kLanguageMainMenuSize = 5;
@@ -40,7 +37,6 @@ const int kLanguageMainMenuSize = 5;
const char kLanguagesTopped[] = "es,it,de,fr,en-US";
const int kMoreLanguagesSubMenu = 200;
-#if defined(USE_AURA)
// Notifies all views::Widgets attached to |window|'s hierarchy that their
// locale has changed.
void NotifyLocaleChanged(aura::Window* window) {
@@ -54,7 +50,6 @@ void NotifyLocaleChanged(aura::Window* window) {
NotifyLocaleChanged(*it);
}
}
-#endif
} // namespace
@@ -150,24 +145,6 @@ bool LanguageSwitchMenu::SwitchLanguage(const std::string& locale) {
// static
void LanguageSwitchMenu::LoadFontsForCurrentLocale() {
-#if defined(TOOLKIT_USES_GTK)
- std::string gtkrc = l10n_util::GetStringUTF8(IDS_LOCALE_GTKRC);
-
- // Read locale-specific gtkrc. Ideally we'd discard all the previously read
- // gtkrc information, but GTK doesn't support that. Reading the new locale's
- // gtkrc overrides the styles from previous ones when there is a conflict, but
- // styles that are added and not conflicted will not be overridden. So far
- // there are no locales with such a thing; if there are then this solution
- // will not work.
- if (!gtkrc.empty())
- gtk_rc_parse_string(gtkrc.c_str());
- else
- gtk_rc_parse("/etc/gtk-2.0/gtkrc");
-#else
- // TODO(saintlou): Need to figure out an Aura equivalent.
- NOTIMPLEMENTED();
-#endif
-
// Switch the font.
gfx::PlatformFontPango::ReloadDefaultFont();
ResourceBundle::GetSharedInstance().ReloadFonts();
@@ -222,13 +199,7 @@ void LanguageSwitchMenu::ExecuteCommand(int command_id) {
// that users can use those keyboard layouts on the login screen.
SwitchLanguageAndEnableKeyboardLayouts(locale);
InitLanguageMenu();
-
-#if defined(USE_AURA)
NotifyLocaleChanged(ash::Shell::GetRootWindow());
-#else
- // Update all view hierarchies that the locale has changed.
- views::Widget::NotifyLocaleChanged();
-#endif
}
} // namespace chromeos
diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc
index 9ff3d75..29f9f99 100644
--- a/chrome/browser/chromeos/login/login_utils.cc
+++ b/chrome/browser/chromeos/login/login_utils.cc
@@ -6,6 +6,7 @@
#include <vector>
+#include "ash/ash_switches.h"
#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "base/file_path.h"
@@ -79,12 +80,8 @@
#include "net/http/http_transaction_factory.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
-#include "ui/gfx/gl/gl_switches.h"
-
-#if defined(USE_AURA)
-#include "ash/ash_switches.h"
#include "ui/gfx/compositor/compositor_switches.h"
-#endif
+#include "ui/gfx/gl/gl_switches.h"
using content::BrowserThread;
@@ -1051,7 +1048,6 @@ std::string LoginUtilsImpl::GetOffTheRecordCommandLine(
switches::kPpapiFlashPath,
switches::kPpapiFlashVersion,
switches::kTouchDevices,
-#if defined(USE_AURA)
ash::switches::kDisableAshUberTray,
ash::switches::kAuraLegacyPowerButton,
ash::switches::kAuraNoShadows,
@@ -1059,7 +1055,6 @@ std::string LoginUtilsImpl::GetOffTheRecordCommandLine(
ash::switches::kAuraWindowAnimationsDisabled,
switches::kUIEnablePartialSwap,
switches::kUIUseGPUProcess,
-#endif
switches::kUseGL,
switches::kUserDataDir,
#if defined(USE_VIRTUAL_KEYBOARD)
diff --git a/chrome/browser/chromeos/login/screen_locker_tester.cc b/chrome/browser/chromeos/login/screen_locker_tester.cc
index 02dfb42..14d5276 100644
--- a/chrome/browser/chromeos/login/screen_locker_tester.cc
+++ b/chrome/browser/chromeos/login/screen_locker_tester.cc
@@ -24,11 +24,6 @@
#include "ui/views/events/event.h"
#include "ui/views/widget/root_view.h"
-
-#if defined(TOOLKIT_USES_GTK)
-#include "chrome/browser/chromeos/login/lock_window_gtk.h"
-#endif
-
using content::WebContents;
namespace {
@@ -164,10 +159,6 @@ void WebUIScreenLockerTester::EnterPassword(const std::string& password) {
}
void WebUIScreenLockerTester::EmulateWindowManagerReady() {
-#if !defined(USE_AURA)
- static_cast<LockWindowGtk*>(GetWidget()->native_widget())->
- OnWindowManagerReady();
-#endif
}
views::Widget* WebUIScreenLockerTester::GetWidget() const {
diff --git a/chrome/browser/chromeos/login/version_info_updater.cc b/chrome/browser/chromeos/login/version_info_updater.cc
index 98e0712..72c068b 100644
--- a/chrome/browser/chromeos/login/version_info_updater.cc
+++ b/chrome/browser/chromeos/login/version_info_updater.cc
@@ -75,11 +75,6 @@ void VersionInfoUpdater::StartUpdate(bool is_official_build) {
}
void VersionInfoUpdater::UpdateVersionLabel() {
-#if defined(USE_AURA)
- // Suffix added to the version string on Aura builds.
- const char *kAuraSuffix = " Aura";
-#endif
-
if (!base::chromeos::IsRunningOnChromeOS()) {
if (delegate_) {
delegate_->OnOSVersionLabelTextUpdated(
@@ -95,11 +90,7 @@ void VersionInfoUpdater::UpdateVersionLabel() {
std::string label_text = l10n_util::GetStringFUTF8(
IDS_LOGIN_VERSION_LABEL_FORMAT,
l10n_util::GetStringUTF16(IDS_PRODUCT_NAME),
-#if defined(USE_AURA)
- UTF8ToUTF16(version_info.Version() + kAuraSuffix),
-#else
UTF8ToUTF16(version_info.Version()),
-#endif
UTF8ToUTF16(version_text_));
if (!enterprise_domain_text_.empty()) {
diff --git a/chrome/browser/chromeos/login/webui_login_display_host.cc b/chrome/browser/chromeos/login/webui_login_display_host.cc
index dceb1a5..fdd9e85 100644
--- a/chrome/browser/chromeos/login/webui_login_display_host.cc
+++ b/chrome/browser/chromeos/login/webui_login_display_host.cc
@@ -4,6 +4,9 @@
#include "chrome/browser/chromeos/login/webui_login_display_host.h"
+#include "ash/shell.h"
+#include "ash/shell_window_ids.h"
+#include "ash/wm/window_animations.h"
#include "base/command_line.h"
#include "base/memory/scoped_ptr.h"
#include "base/time.h"
@@ -14,14 +17,8 @@
#include "chrome/browser/chromeos/login/wizard_controller.h"
#include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
#include "content/public/browser/web_ui.h"
-#include "ui/views/widget/widget.h"
-
-#if defined(USE_AURA)
-#include "ash/shell.h"
-#include "ash/shell_window_ids.h"
-#include "ash/wm/window_animations.h"
#include "ui/aura/window.h"
-#endif
+#include "ui/views/widget/widget.h"
namespace chromeos {
@@ -143,14 +140,12 @@ void WebUILoginDisplayHost::OnPreferencesChanged() {
}
void WebUILoginDisplayHost::OnBrowserCreated() {
-#if defined(USE_AURA)
// Close lock window now so that the launched browser can receive focus.
if (login_window_) {
login_window_->Close();
login_window_ = NULL;
login_view_ = NULL;
}
-#endif
}
void WebUILoginDisplayHost::LoadURL(const GURL& url) {
@@ -158,12 +153,10 @@ void WebUILoginDisplayHost::LoadURL(const GURL& url) {
views::Widget::InitParams params(
views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
params.bounds = background_bounds();
-#if defined(USE_AURA)
params.show_state = ui::SHOW_STATE_FULLSCREEN;
params.parent =
ash::Shell::GetInstance()->GetContainer(
ash::internal::kShellWindowId_LockScreenContainer);
-#endif
login_window_ = new views::Widget;
login_window_->Init(params);
@@ -171,22 +164,18 @@ void WebUILoginDisplayHost::LoadURL(const GURL& url) {
login_view_->Init(login_window_);
-#if defined(USE_AURA)
ash::SetWindowVisibilityAnimationDuration(
login_window_->GetNativeView(),
base::TimeDelta::FromMilliseconds(kLoginFadeoutTransitionDurationMs));
ash::SetWindowVisibilityAnimationTransition(
login_window_->GetNativeView(),
ash::ANIMATE_HIDE);
-#endif
login_window_->SetContentsView(login_view_);
login_view_->UpdateWindowType();
login_window_->Show();
-#if defined(USE_AURA)
login_window_->GetNativeView()->SetName("WebUILoginView");
-#endif
login_view_->OnWindowCreated();
}
login_view_->LoadURL(url);
diff --git a/chrome/browser/chromeos/login/webui_login_view.cc b/chrome/browser/chromeos/login/webui_login_view.cc
index 1fa7d2b..a85ec36 100644
--- a/chrome/browser/chromeos/login/webui_login_view.cc
+++ b/chrome/browser/chromeos/login/webui_login_view.cc
@@ -17,6 +17,7 @@
#include "chrome/browser/chromeos/login/webui_login_display.h"
#include "chrome/browser/chromeos/status/status_area_view.h"
#include "chrome/browser/profiles/profile_manager.h"
+#include "chrome/browser/ui/views/ash/chrome_shell_delegate.h"
#include "chrome/browser/ui/views/dom_view.h"
#include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
#include "chrome/common/chrome_notification_types.h"
@@ -33,9 +34,6 @@
#include "chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.h"
#endif
-#if defined(USE_AURA)
-#include "chrome/browser/ui/views/ash/chrome_shell_delegate.h"
-#endif
using content::RenderViewHost;
using content::WebContents;
@@ -122,10 +120,6 @@ WebUILoginView::WebUILoginView()
status_area_visibility_on_init_(true),
login_page_is_loaded_(false),
should_emit_login_prompt_visible_(true) {
-#if !defined(USE_AURA)
- // The X window manager emits this signal in non-Aura builds.
- should_emit_login_prompt_visible_ = false;
-#endif
registrar_.Add(this,
chrome::NOTIFICATION_LOGIN_WEBUI_READY,
@@ -207,15 +201,6 @@ gfx::NativeWindow WebUILoginView::GetNativeWindow() const {
}
void WebUILoginView::OnWindowCreated() {
-#if defined(TOOLKIT_USES_GTK)
- // Freezes host window update until the tab is rendered.
- host_window_frozen_ = static_cast<views::NativeWidgetGtk*>(
- GetWidget()->native_widget())->SuppressFreezeUpdates();
-#else
- // TODO(saintlou): Unclear if we need this for the !gtk case.
- // According to nkostylev it prevents the renderer from flashing with a
- // white solid background until the content is fully rendered.
-#endif
}
void WebUILoginView::UpdateWindowType() {
@@ -309,22 +294,8 @@ void WebUILoginView::OnTabMainFrameRender() {
StatusAreaViewChromeos::SetScreenMode(GetScreenMode());
// In aura there's a global status area shown already.
-#if defined(USE_AURA)
status_area_ = ChromeShellDelegate::instance()->GetStatusArea();
status_area_->SetVisible(status_area_visibility_on_init_);
-#else
- InitStatusArea();
-#endif
-
-#if defined(TOOLKIT_USES_GTK)
- if (host_window_frozen_) {
- host_window_frozen_ = false;
-
- // Unfreezes the host window since tab is rendered now.
- views::NativeWidgetGtk::UpdateFreezeUpdatesProperty(
- GetNativeWindow(), false);
- }
-#endif
if (should_emit_login_prompt_visible_) {
chromeos::DBusThreadManager::Get()->GetSessionManagerClient()->
@@ -367,15 +338,6 @@ void WebUILoginView::InitStatusArea() {
status_window_ = new views::Widget;
status_window_->Init(widget_params);
-#if defined(TOOLKIT_USES_GTK)
- std::vector<int> params;
- params.push_back(1); // Show while screen is locked.
- chromeos::WmIpc::instance()->SetWindowType(
- status_window_->GetNativeView(),
- chromeos::WM_IPC_WINDOW_CHROME_INFO_BUBBLE,
- &params);
-#endif
-
views::View* contents_view = new RightAlignedView;
contents_view->AddChildView(status_area_);
status_window_->SetContentsView(contents_view);
diff --git a/chrome/browser/chromeos/media/media_player.cc b/chrome/browser/chromeos/media/media_player.cc
index b22c439..e2fbfa2 100644
--- a/chrome/browser/chromeos/media/media_player.cc
+++ b/chrome/browser/chromeos/media/media_player.cc
@@ -19,10 +19,6 @@
#include "net/url_request/url_request_job.h"
#include "ui/gfx/screen.h"
-#if defined(OS_CHROMEOS) && defined(TOOLKIT_USES_GTK)
-#include "chrome/browser/chromeos/frame/panel_browser_view.h"
-#endif
-
using content::BrowserThread;
using content::UserMetricsAction;
@@ -152,18 +148,6 @@ void MediaPlayer::PopupMediaPlayer(Browser* creator) {
chrome::NOTIFICATION_BROWSER_CLOSED,
content::Source<Browser>(mediaplayer_browser_));
-#if defined(OS_CHROMEOS) && defined(TOOLKIT_USES_GTK)
- // Since we are on chromeos, popups should be a PanelBrowserView,
- // so we can just cast it.
- if (creator) {
- chromeos::PanelBrowserView* creatorview =
- static_cast<chromeos::PanelBrowserView*>(creator->window());
- chromeos::PanelBrowserView* view =
- static_cast<chromeos::PanelBrowserView*>(
- mediaplayer_browser_->window());
- view->SetCreatorView(creatorview);
- }
-#endif
mediaplayer_browser_->AddSelectedTabWithURL(GetMediaPlayerUrl(),
content::PAGE_TRANSITION_LINK);
mediaplayer_browser_->window()->Show();
diff --git a/chrome/browser/chromeos/notifications/system_notification.cc b/chrome/browser/chromeos/notifications/system_notification.cc
index 8127402..f248707 100644
--- a/chrome/browser/chromeos/notifications/system_notification.cc
+++ b/chrome/browser/chromeos/notifications/system_notification.cc
@@ -6,17 +6,12 @@
#include "base/callback.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/chromeos/notifications/balloon_collection_impl_aura.h"
#include "chrome/browser/chromeos/notifications/system_notification_factory.h"
#include "chrome/browser/notifications/notification.h"
#include "chrome/browser/notifications/notification_ui_manager.h"
#include "chrome/browser/ui/webui/web_ui_util.h"
-#if defined(USE_AURA)
-#include "chrome/browser/chromeos/notifications/balloon_collection_impl_aura.h"
-#else
-#include "chrome/browser/chromeos/notifications/balloon_collection_impl.h"
-#endif
-
namespace chromeos {
void SystemNotification::Init(int icon_resource_id) {
diff --git a/chrome/browser/chromeos/notifications/system_notification.h b/chrome/browser/chromeos/notifications/system_notification.h
index ad23750..aa3e4fd 100644
--- a/chrome/browser/chromeos/notifications/system_notification.h
+++ b/chrome/browser/chromeos/notifications/system_notification.h
@@ -19,13 +19,8 @@ class Profile;
namespace chromeos {
-#if defined(USE_AURA)
class BalloonCollectionImplAura;
typedef class BalloonCollectionImplAura BalloonCollectionImplType;
-#else
-class BalloonCollectionImpl;
-typedef class BalloonCollectionImpl BalloonCollectionImplType;
-#endif
// The system notification object handles the display of a system notification
diff --git a/chrome/browser/chromeos/status/input_method_menu.cc b/chrome/browser/chromeos/status/input_method_menu.cc
index 8fe6ae8..f27db8c 100644
--- a/chrome/browser/chromeos/status/input_method_menu.cc
+++ b/chrome/browser/chromeos/status/input_method_menu.cc
@@ -131,7 +131,6 @@ InputMethodMenu::InputMethodMenu()
registrar_.Add(this,
chrome::NOTIFICATION_LOGIN_USER_CHANGED,
content::NotificationService::AllSources());
-#if defined(USE_AURA)
// On Aura status area is not recreated on sign in. Instead, 2 notifications
// are sent to Chrome on sign in: NOTIFICATION_LOGIN_USER_CHANGED with
// StatusAreaViewChromeos::IsLoginMode() and NOTIFICATION_SESSION_STARTED
@@ -142,7 +141,6 @@ InputMethodMenu::InputMethodMenu()
registrar_.Add(this,
chrome::NOTIFICATION_SESSION_STARTED,
content::NotificationService::AllSources());
-#endif
}
AddObservers();
}
@@ -618,7 +616,6 @@ void InputMethodMenu::Observe(int type,
// anymore.
RemoveObservers();
}
-#if defined(USE_AURA)
if (type == chrome::NOTIFICATION_SESSION_STARTED) {
InitializePrefMembers();
AddObservers();
@@ -626,7 +623,6 @@ void InputMethodMenu::Observe(int type,
UpdateUIFromInputMethod(manager->GetCurrentInputMethod(),
manager->GetNumActiveInputMethods());
}
-#endif
}
void InputMethodMenu::SetMinimumWidth(int width) {
diff --git a/chrome/browser/chromeos/status/network_menu.cc b/chrome/browser/chromeos/status/network_menu.cc
index 5da84184..f082018 100644
--- a/chrome/browser/chromeos/status/network_menu.cc
+++ b/chrome/browser/chromeos/status/network_menu.cc
@@ -1003,10 +1003,6 @@ NetworkMenu::NetworkMenu(Delegate* delegate)
new views::MenuModelAdapter(main_menu_model_.get()));
menu_item_view_ = new views::MenuItemView(menu_model_adapter_.get());
menu_item_view_->set_has_icons(true);
-#if !defined(USE_AURA)
- menu_item_view_->set_menu_position(
- views::MenuItemView::POSITION_BELOW_BOUNDS);
-#endif
menu_runner_.reset(new views::MenuRunner(menu_item_view_));
}
diff --git a/chrome/browser/chromeos/status/status_area_view.cc b/chrome/browser/chromeos/status/status_area_view.cc
index f7b5f4e..74c4791 100644
--- a/chrome/browser/chromeos/status/status_area_view.cc
+++ b/chrome/browser/chromeos/status/status_area_view.cc
@@ -89,10 +89,8 @@ void StatusAreaView::Layout() {
}
void StatusAreaView::PreferredSizeChanged() {
-#if defined(USE_AURA)
if (GetWidget())
GetWidget()->SetSize(GetPreferredSize());
-#endif
views::AccessiblePaneView::PreferredSizeChanged();
}
diff --git a/chrome/browser/chromeos/system_key_event_listener.cc b/chrome/browser/chromeos/system_key_event_listener.cc
index 773e1f7..6f762aa 100644
--- a/chrome/browser/chromeos/system_key_event_listener.cc
+++ b/chrome/browser/chromeos/system_key_event_listener.cc
@@ -26,7 +26,7 @@
#if defined(USE_WAYLAND)
#include "base/message_pump_wayland.h"
-#elif !defined(TOOLKIT_USES_GTK)
+#else
#include "base/message_pump_x.h"
#endif
@@ -35,27 +35,7 @@ using content::UserMetricsAction;
namespace chromeos {
namespace {
-
-// TODO(yusukes): Remove code for non-Aura version of Chrome OS in this file
-// once Aura version of the OS is released.
-#if !defined(USE_AURA)
-// Percent by which the volume should be changed when a volume key is pressed.
-const double kStepPercentage = 4.0;
-
-// Percent to which the volume should be set when the "volume up" key is pressed
-// while we're muted and have the volume set to 0. See
-// http://crosbug.com/13618.
-const double kVolumePercentOnVolumeUpWhileMuted = 25.0;
-
-// In ProcessedXEvent(), we should check only Alt, Shift, Control, and Caps Lock
-// modifiers, and should ignore Num Lock, Super, Hyper etc. See
-// http://crosbug.com/21842.
-const unsigned int kSupportedModifiers =
- Mod1Mask | ShiftMask | ControlMask | LockMask;
-#endif
-
static SystemKeyEventListener* g_system_key_event_listener = NULL;
-
} // namespace
// static
@@ -138,11 +118,7 @@ SystemKeyEventListener::SystemKeyEventListener()
LOG(WARNING) << "Could not install Xkb Indicator observer";
}
-#if defined(TOOLKIT_USES_GTK)
- gdk_window_add_filter(NULL, GdkEventFilter, this);
-#else
MessageLoopForUI::current()->AddObserver(this);
-#endif
}
SystemKeyEventListener::~SystemKeyEventListener() {
@@ -152,11 +128,7 @@ SystemKeyEventListener::~SystemKeyEventListener() {
void SystemKeyEventListener::Stop() {
if (stopped_)
return;
-#if defined(TOOLKIT_USES_GTK)
- gdk_window_remove_filter(NULL, GdkEventFilter, this);
-#else
MessageLoopForUI::current()->RemoveObserver(this);
-#endif
stopped_ = true;
}
@@ -169,18 +141,6 @@ void SystemKeyEventListener::RemoveCapsLockObserver(
caps_lock_observers_.RemoveObserver(observer);
}
-#if defined(TOOLKIT_USES_GTK)
-// static
-GdkFilterReturn SystemKeyEventListener::GdkEventFilter(GdkXEvent* gxevent,
- GdkEvent* gevent,
- gpointer data) {
- SystemKeyEventListener* listener = static_cast<SystemKeyEventListener*>(data);
- XEvent* xevent = static_cast<XEvent*>(gxevent);
-
- return listener->ProcessedXEvent(xevent) ? GDK_FILTER_REMOVE
- : GDK_FILTER_CONTINUE;
-}
-#else // defined(TOOLKIT_USES_GTK)
base::EventStatus SystemKeyEventListener::WillProcessEvent(
const base::NativeEvent& event) {
return ProcessedXEvent(event) ? base::EVENT_HANDLED : base::EVENT_CONTINUE;
@@ -188,7 +148,6 @@ base::EventStatus SystemKeyEventListener::WillProcessEvent(
void SystemKeyEventListener::DidProcessEvent(const base::NativeEvent& event) {
}
-#endif // defined(TOOLKIT_USES_GTK)
void SystemKeyEventListener::GrabKey(int32 key, uint32 mask) {
uint32 caps_lock_mask = LockMask;
@@ -203,102 +162,16 @@ void SystemKeyEventListener::GrabKey(int32 key, uint32 mask) {
True, GrabModeAsync, GrabModeAsync);
}
-#if !defined(USE_AURA)
-void SystemKeyEventListener::OnBrightnessDown() {
- DBusThreadManager::Get()->GetPowerManagerClient()->
- DecreaseScreenBrightness(true);
-}
-
-void SystemKeyEventListener::OnBrightnessUp() {
- DBusThreadManager::Get()->GetPowerManagerClient()->
- IncreaseScreenBrightness();
-}
-
-void SystemKeyEventListener::OnVolumeMute() {
- AudioHandler* audio_handler = AudioHandler::GetInstance();
-
- // Always muting (and not toggling) as per final decision on
- // http://crosbug.com/3751
- audio_handler->SetMuted(true);
-
- extensions::DispatchVolumeChangedEvent(audio_handler->GetVolumePercent(),
- audio_handler->IsMuted());
- ShowVolumeBubble();
-}
-
-void SystemKeyEventListener::OnVolumeDown() {
- AudioHandler* audio_handler = AudioHandler::GetInstance();
-
- if (audio_handler->IsMuted())
- audio_handler->SetVolumePercent(0.0);
- else
- audio_handler->AdjustVolumeByPercent(-kStepPercentage);
-
- extensions::DispatchVolumeChangedEvent(audio_handler->GetVolumePercent(),
- audio_handler->IsMuted());
- ShowVolumeBubble();
-}
-
-void SystemKeyEventListener::OnVolumeUp() {
- AudioHandler* audio_handler = AudioHandler::GetInstance();
-
- if (audio_handler->IsMuted()) {
- audio_handler->SetMuted(false);
- if (audio_handler->GetVolumePercent() <= 0.1) // float comparison
- audio_handler->SetVolumePercent(kVolumePercentOnVolumeUpWhileMuted);
- } else {
- audio_handler->AdjustVolumeByPercent(kStepPercentage);
- }
-
- extensions::DispatchVolumeChangedEvent(audio_handler->GetVolumePercent(),
- audio_handler->IsMuted());
- ShowVolumeBubble();
-}
-#endif
-
void SystemKeyEventListener::OnCapsLock(bool enabled) {
FOR_EACH_OBSERVER(CapsLockObserver,
caps_lock_observers_,
OnCapsLockChange(enabled));
}
-#if !defined(USE_AURA)
-void SystemKeyEventListener::ShowVolumeBubble() {
- AudioHandler* audio_handler = AudioHandler::GetInstance();
- VolumeBubble::GetInstance()->ShowBubble(
- audio_handler->GetVolumePercent(),
- !audio_handler->IsMuted());
- BrightnessBubble::GetInstance()->HideBubble();
-}
-#endif
-
bool SystemKeyEventListener::ProcessedXEvent(XEvent* xevent) {
input_method::InputMethodManager* input_method_manager =
input_method::InputMethodManager::GetInstance();
-#if !defined(USE_AURA)
- if (xevent->type == FocusIn) {
- // This is a workaround for the Shift+Alt+Tab issue (crosbug.com/8855,
- // crosbug.com/24182). Reset |hotkey_manager| on the Tab key press so that
- // the manager will not switch current keyboard layout on the subsequent Alt
- // or Shift key release. Note that when Aura is in use, we don't need this
- // workaround since the environment does not have the Chrome OS Window
- // Manager and the Tab key press/release is not consumed by the WM.
- input_method::HotkeyManager* hotkey_manager =
- input_method_manager->GetHotkeyManager();
- hotkey_manager->OnFocus();
- }
-
- if (xevent->type == KeyPress || xevent->type == KeyRelease) {
- // Change the current keyboard layout (or input method) if xevent is one of
- // the input method hotkeys.
- input_method::HotkeyManager* hotkey_manager =
- input_method_manager->GetHotkeyManager();
- if (hotkey_manager->FilterKeyEvent(*xevent))
- return true;
- }
-#endif
-
if (xevent->type == xkb_event_base_) {
// TODO(yusukes): Move this part to aura::RootWindowHost.
XkbEvent* xkey_event = reinterpret_cast<XkbEvent*>(xevent);
@@ -329,62 +202,6 @@ bool SystemKeyEventListener::ProcessedXEvent(XEvent* xevent) {
return true;
}
-#if !defined(USE_AURA)
- } else if (xevent->type == KeyPress) {
- const int32 keycode = xevent->xkey.keycode;
- if (keycode) {
- const unsigned int state = (xevent->xkey.state & kSupportedModifiers);
-
- // Toggle Caps Lock if Shift and Search keys are pressed.
- // When Aura is in use, the shortcut is handled in Ash.
- if (XKeycodeToKeysym(ui::GetXDisplay(), keycode, 0) == XK_Super_L) {
- const bool shift_is_held = (state & ShiftMask);
- const bool other_mods_are_held = (state & ~(ShiftMask | LockMask));
-
- // When spoken feedback is enabled, the Search key is used as an
- // accessibility modifier key.
- const bool accessibility_enabled =
- accessibility::IsSpokenFeedbackEnabled();
-
- if (shift_is_held && !other_mods_are_held && !accessibility_enabled) {
- input_method_manager->GetXKeyboard()->SetCapsLockEnabled(
- !caps_lock_is_on_);
- }
- }
-
- // Only doing non-Alt/Shift/Ctrl modified keys
- if (!(state & (Mod1Mask | ShiftMask | ControlMask))) {
- if (keycode == key_f6_ || keycode == key_brightness_down_) {
- if (keycode == key_f6_)
- content::RecordAction(
- UserMetricsAction("Accel_BrightnessDown_F6"));
- OnBrightnessDown();
- return true;
- } else if (keycode == key_f7_ || keycode == key_brightness_up_) {
- if (keycode == key_f7_)
- content::RecordAction(
- UserMetricsAction("Accel_BrightnessUp_F7"));
- OnBrightnessUp();
- return true;
- } else if (keycode == key_f8_ || keycode == key_volume_mute_) {
- if (keycode == key_f8_)
- content::RecordAction(UserMetricsAction("Accel_VolumeMute_F8"));
- OnVolumeMute();
- return true;
- } else if (keycode == key_f9_ || keycode == key_volume_down_) {
- if (keycode == key_f9_)
- content::RecordAction(UserMetricsAction("Accel_VolumeDown_F9"));
- OnVolumeDown();
- return true;
- } else if (keycode == key_f10_ || keycode == key_volume_up_) {
- if (keycode == key_f10_)
- content::RecordAction(UserMetricsAction("Accel_VolumeUp_F10"));
- OnVolumeUp();
- return true;
- }
- }
- }
-#endif
}
return false;
}
diff --git a/chrome/browser/chromeos/system_key_event_listener.h b/chrome/browser/chromeos/system_key_event_listener.h
index e8fe9df..3065548 100644
--- a/chrome/browser/chromeos/system_key_event_listener.h
+++ b/chrome/browser/chromeos/system_key_event_listener.h
@@ -6,10 +6,6 @@
#define CHROME_BROWSER_CHROMEOS_SYSTEM_KEY_EVENT_LISTENER_H_
#pragma once
-#if defined(TOOLKIT_USES_GTK)
-#include <gdk/gdk.h>
-#endif
-
#include "base/memory/singleton.h"
#include "base/message_loop.h"
@@ -17,12 +13,6 @@ typedef union _XEvent XEvent;
namespace chromeos {
-// TODO(yusukes): Remove code for non-Aura version of Chrome OS in this file
-// once Aura version of the OS is released.
-#if !defined(USE_AURA)
-class AudioHandler;
-#endif
-
// SystemKeyEventListener listens for volume related key presses from GDK, then
// tells the AudioHandler to adjust volume accordingly. Start by just calling
// instance() to get it going.
@@ -57,43 +47,17 @@ class SystemKeyEventListener : public MessageLoopForUI::Observer {
SystemKeyEventListener();
virtual ~SystemKeyEventListener();
-#if defined(TOOLKIT_USES_GTK)
- // This event filter intercepts events before they reach GDK, allowing us to
- // check for system level keyboard events regardless of which window has
- // focus.
- static GdkFilterReturn GdkEventFilter(GdkXEvent* gxevent,
- GdkEvent* gevent,
- gpointer data);
-
- // MessageLoopForUI::Observer overrides.
- virtual void WillProcessEvent(GdkEvent* event) OVERRIDE {}
- virtual void DidProcessEvent(GdkEvent* event) OVERRIDE {}
-#else
// MessageLoopForUI::Observer overrides.
virtual base::EventStatus WillProcessEvent(
const base::NativeEvent& event) OVERRIDE;
virtual void DidProcessEvent(const base::NativeEvent& event) OVERRIDE;
-#endif
// Tell X we are interested in the specified key/mask combination.
// CapsLock and Numlock are always ignored.
void GrabKey(int32 key, uint32 mask);
-#if !defined(USE_AURA)
- void OnBrightnessDown();
- void OnBrightnessUp();
- void OnVolumeMute();
- void OnVolumeDown();
- void OnVolumeUp();
-#endif
void OnCapsLock(bool enabled);
-#if !defined(USE_AURA)
- // Displays the volume bubble for the current volume and muting status.
- // Also hides the brightness bubble if it's being shown.
- void ShowVolumeBubble();
-#endif
-
// Returns true if the event was processed, false otherwise.
virtual bool ProcessedXEvent(XEvent* xevent);
diff --git a/chrome/browser/chromeos/system_key_event_listener_browsertest.cc b/chrome/browser/chromeos/system_key_event_listener_browsertest.cc
index ef1331f..b820206 100644
--- a/chrome/browser/chromeos/system_key_event_listener_browsertest.cc
+++ b/chrome/browser/chromeos/system_key_event_listener_browsertest.cc
@@ -27,14 +27,12 @@
#define TestKoreanInputMethod DISABLED_TestKoreanInputMethod
#endif
-#if defined(USE_AURA)
// When Aura is in use, the shortcut is handled in Ash.
#define TestInputMethod DISABLED_TestInputMethod
#define TestInputMethodWithNumLock DISABLED_TestInputMethodWithNumLock
#define TestKoreanInputMethod DISABLED_TestKoreanInputMethod
#define TestCapsLock DISABLED_TestCapsLock
#define TestCapsLockWithNumLock DISABLED_TestCapsLockWithNumLock
-#endif
namespace chromeos {
namespace {
diff --git a/chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h b/chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h
index 75d0cee..486f328 100644
--- a/chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h
+++ b/chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,10 +6,6 @@
#define CHROME_BROWSER_CHROMEOS_XINPUT_HIERARCHY_CHANGED_EVENT_LISTENER_H_
#pragma once
-#if defined(TOOLKIT_USES_GTK)
-#include <gdk/gdk.h>
-#endif
-
#include "base/memory/singleton.h"
#include "base/message_loop.h"
#include "base/observer_list.h"
@@ -43,23 +39,10 @@ class XInputHierarchyChangedEventListener : public MessageLoopForUI::Observer {
void Init();
void StopImpl();
-#if defined(TOOLKIT_USES_GTK)
- // When GTK events are processed, WillProcessXEvent() is not called
- // automatically. It is necessary to call the function manually by adding the
- // Gdk event filter.
- static GdkFilterReturn GdkEventFilter(GdkXEvent* gxevent,
- GdkEvent* gevent,
- gpointer data);
-
- // MessageLoopForUI::Observer overrides.
- virtual void WillProcessEvent(GdkEvent* event) OVERRIDE {}
- virtual void DidProcessEvent(GdkEvent* event) OVERRIDE {}
-#else
// MessageLoopForUI::Observer overrides.
virtual base::EventStatus WillProcessEvent(
const base::NativeEvent& event) OVERRIDE;
virtual void DidProcessEvent(const base::NativeEvent& event) OVERRIDE;
-#endif
// Returns true if the event was processed, false otherwise.
virtual bool ProcessedXEvent(XEvent* xevent);