ash: Add a heads-up display to track touch-point states and positions.
The command-line flag to turn on the HUD is --ash-touch-hud. It can also be
turned on from about:flags
BUG=none
TEST=manually
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=137549
Review URL: https://chromiumcodereview.appspot.com/10386178
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137605 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/ash/shell.cc b/ash/shell.cc
index c0a555f..663d7e18 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 @@
#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.
@@ -684,6 +687,13 @@
CreateSpecialContainers(root_window);
+ CommandLine* command_line = CommandLine::ForCurrentProcess();
+
+ if (command_line->HasSwitch(switches::kAshTouchHud)) {
+ touch_observer_hud_.reset(new internal::TouchObserverHUD);
+ AddRootWindowEventFilter(touch_observer_hud_.get());
+ }
+
stacking_controller_.reset(new internal::StackingController);
root_window_layout_ = new internal::RootWindowLayoutManager(root_window);
@@ -691,8 +701,6 @@
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()));