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

Unified Diff: ash/shell.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/shell.h ('k') | ash/touch/touch_hud_debug.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index cfd310503d56ff89139c07d5e2f3ec8e992505a2..0ee5b6f16071df3be8ba7d8b0aace1618682d167 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -211,7 +211,8 @@ Shell::Shell(ShellDelegate* delegate)
cursor_manager_(scoped_ptr<views::corewm::NativeCursorManager>(
native_cursor_manager_)),
browser_context_(NULL),
- simulate_modal_window_open_for_testing_(false) {
+ simulate_modal_window_open_for_testing_(false),
+ is_touch_hud_projection_enabled_(false) {
DCHECK(delegate_.get());
display_manager_.reset(new internal::DisplayManager);
mirror_window_controller_.reset(new internal::MirrorWindowController);
@@ -860,6 +861,22 @@ LauncherDelegate* Shell::GetLauncherDelegate() {
return launcher_delegate_.get();
}
+void Shell::SetTouchHudProjectionEnabled(bool enabled) {
+ if (is_touch_hud_projection_enabled_ == enabled)
+ return;
+
+ RootWindowList roots = GetInstance()->GetAllRootWindows();
+ for (RootWindowList::iterator iter = roots.begin(); iter != roots.end();
+ ++iter) {
+ internal::RootWindowController* controller = GetRootWindowController(*iter);
+ if (enabled)
+ controller->EnableTouchHudProjection();
+ else
+ controller->DisableTouchHudProjection();
+ }
+ is_touch_hud_projection_enabled_ = enabled;
+}
+
void Shell::InitRootWindowForSecondaryDisplay(aura::RootWindow* root) {
aura::client::SetFocusClient(root, focus_client_.get());
internal::RootWindowController* controller =
@@ -919,6 +936,7 @@ void Shell::InitRootWindowController(
root_window->SetCursor(ui::kCursorPointer);
controller->InitLayoutManagers();
+ controller->InitTouchHuds();
// TODO(oshima): Move the instance to RootWindowController when
// the extended desktop is enabled by default.
« no previous file with comments | « ash/shell.h ('k') | ash/touch/touch_hud_debug.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698