Chromium Code Reviews| Index: ash/shell.cc |
| diff --git a/ash/shell.cc b/ash/shell.cc |
| index c0a555f40681e5d46a5b04c2d86df0c626e18f93..6e4effd36d155ac8ab8c8ebdc001872988f65d32 100644 |
| --- a/ash/shell.cc |
| +++ b/ash/shell.cc |
| @@ -27,6 +27,7 @@ |
| #include "ash/system/tray/system_tray.h" |
| #include "ash/system/tray/system_tray_delegate.h" |
| #include "ash/tooltips/tooltip_controller.h" |
| +#include "ash/touch/touch_observer_hud.h" |
| #include "ash/wm/activation_controller.h" |
| #include "ash/wm/app_list_controller.h" |
| #include "ash/wm/base_layout_manager.h" |
| @@ -553,6 +554,8 @@ Shell::~Shell() { |
| #if !defined(OS_MACOSX) |
| RemoveRootWindowEventFilter(accelerator_filter_.get()); |
| #endif |
| + if (touch_observer_hud_.get()) |
| + RemoveRootWindowEventFilter(touch_observer_hud_.get()); |
| // Close background widget now so that the focus manager of the |
| // widget gets deleted in the final message loop run. |
| @@ -676,6 +679,13 @@ void Shell::Init() { |
| system_gesture_filter_.reset(new internal::SystemGestureEventFilter); |
| AddRootWindowEventFilter(system_gesture_filter_.get()); |
| + CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| + |
| + if (command_line->HasSwitch(switches::kAshTouchHud)) { |
| + touch_observer_hud_.reset(new internal::TouchObserverHUD); |
| + AddRootWindowEventFilter(touch_observer_hud_.get()); |
| + } |
| + |
| root_window->SetCursor(ui::kCursorPointer); |
| if (initially_hide_cursor_) |
| root_window->ShowCursor(false); |
| @@ -683,6 +693,8 @@ void Shell::Init() { |
| activation_controller_.reset(new internal::ActivationController); |
| CreateSpecialContainers(root_window); |
| + if (touch_observer_hud_.get()) |
| + touch_observer_hud_->Initialize(); |
|
Ben Goodger (Google)
2012/05/16 20:14:35
instead of having an init method, why not just con
sadrul
2012/05/16 20:35:55
Done.
|
| stacking_controller_.reset(new internal::StackingController); |
| @@ -691,8 +703,6 @@ void Shell::Init() { |
| event_client_.reset(new internal::EventClientImpl(root_window)); |
| - CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| - |
| tray_.reset(new SystemTray()); |
| if (delegate_.get()) |
| tray_delegate_.reset(delegate_->CreateSystemTrayDelegate(tray_.get())); |