Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1919)

Unified Diff: ash/shell.cc

Issue 10878058: Move functions for controlling Caps Lock to CapsLockDelegate from SystemTrayDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index c6eb4d3773eaa1c164691ccd596b751986f9b65e..d4baf4e5fe47055c4f486a21adb303a345daee61 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -9,6 +9,7 @@
#include "ash/accelerators/focus_manager_factory.h"
#include "ash/ash_switches.h"
+#include "ash/caps_lock_delegate_stub.h"
#include "ash/desktop_background/desktop_background_controller.h"
#include "ash/desktop_background/desktop_background_resources.h"
#include "ash/desktop_background/desktop_background_view.h"
@@ -17,6 +18,7 @@
#include "ash/high_contrast/high_contrast_controller.h"
#include "ash/launcher/launcher.h"
#include "ash/magnifier/magnification_controller.h"
+#include "ash/caps_lock_delegate.h"
#include "ash/display/display_controller.h"
#include "ash/display/mouse_cursor_event_filter.h"
#include "ash/display/multi_display_manager.h"
@@ -452,6 +454,12 @@ void Shell::Init() {
InitRootWindowController(root_window_controller);
+ // StatusAreaWidget uses Shell's CapsLockDelegate.
+ if (delegate_.get())
+ caps_lock_delegate_.reset(delegate_->CreateCapsLockDelegate());
+ else
+ caps_lock_delegate_.reset(new CapsLockDelegateStub);
+
// Initialize Primary RootWindow specific items.
status_area_widget_ = new internal::StatusAreaWidget();
status_area_widget_->CreateTrayViews(delegate_.get());

Powered by Google App Engine
This is Rietveld 408576698