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

Unified Diff: ash/root_window_controller.cc

Issue 17063013: Separate projection mode from rest of touch HUD (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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
« no previous file with comments | « ash/root_window_controller.h ('k') | ash/shell.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/root_window_controller.cc
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index 2ce0102a402cf7a35fe00bb0af56dc47416e989b..b765fff9c3e96e08fef3e7280f5e7fb343d140b6 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -21,7 +21,8 @@
#include "ash/shell_window_ids.h"
#include "ash/system/status_area_widget.h"
#include "ash/system/tray/system_tray_delegate.h"
-#include "ash/touch/touch_observer_hud.h"
+#include "ash/touch/touch_hud_debug.h"
+#include "ash/touch/touch_hud_projection.h"
#include "ash/wm/base_layout_manager.h"
#include "ash/wm/boot_splash_screen.h"
#include "ash/wm/dock/docked_window_layout_manager.h"
@@ -169,7 +170,8 @@ RootWindowController::RootWindowController(aura::RootWindow* root_window)
root_window_layout_(NULL),
docked_layout_manager_(NULL),
panel_layout_manager_(NULL),
- touch_observer_hud_(NULL) {
+ touch_hud_debug_(NULL),
+ touch_hud_projection_(NULL) {
SetRootWindowController(root_window, this);
screen_dimmer_.reset(new ScreenDimmer(root_window));
@@ -303,12 +305,6 @@ void RootWindowController::InitForPrimaryDisplay() {
void RootWindowController::CreateContainers() {
CreateContainersInRootWindow(root_window_.get());
-
- // Create touch observer HUD if needed. HUD should be created after the
- // containers have been created, so that its widget can be added to them.
- CommandLine* command_line = CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(switches::kAshTouchHud))
- touch_observer_hud_ = new TouchObserverHUD(root_window_.get());
}
void RootWindowController::CreateSystemBackground(
@@ -414,6 +410,18 @@ void RootWindowController::MoveWindowsTo(aura::RootWindow* dst) {
ReparentAllWindows(root_window_.get(), dst);
}
+void RootWindowController::EnableTouchHudProjection() {
+ if (touch_hud_projection_)
+ return;
+ set_touch_hud_projection(new TouchHudProjection(root_window_.get()));
+}
+
+void RootWindowController::DisableTouchHudProjection() {
+ if (!touch_hud_projection_)
+ return;
+ touch_hud_projection_->Remove();
+}
+
ShelfLayoutManager* RootWindowController::GetShelfLayoutManager() {
return shelf_.get() ? shelf_->shelf_layout_manager() : NULL;
}
@@ -456,6 +464,14 @@ void RootWindowController::UpdateShelfVisibility() {
shelf_->shelf_layout_manager()->UpdateVisibilityState();
}
+void RootWindowController::InitTouchHuds() {
+ CommandLine* command_line = CommandLine::ForCurrentProcess();
+ if (command_line->HasSwitch(switches::kAshTouchHud))
+ set_touch_hud_debug(new TouchHudDebug(root_window_.get()));
+ if (Shell::GetInstance()->is_touch_hud_projection_enabled())
+ EnableTouchHudProjection();
+}
+
aura::Window* RootWindowController::GetFullscreenWindow() const {
aura::Window* container = workspace_controller_->GetActiveWorkspaceWindow();
for (size_t i = 0; i < container->children().size(); ++i) {
« no previous file with comments | « ash/root_window_controller.h ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698