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

Unified Diff: ash/root_window_controller.cc

Issue 18163006: Add persisted preference for projection touch HUD (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Resolved clang compile errors + Resolved linux_chromeos trybot failure Created 7 years, 5 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.cc » ('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 ba20f5834e0bf87f04a86edb151b4e80957d664e..7ba969a4836e0f21cd69747d9f9f8ed6dd3b24eb 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -203,18 +203,6 @@ RootWindowController* RootWindowController::ForActiveRootWindow() {
return GetRootWindowController(Shell::GetActiveRootWindow());
}
-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();
-}
-
void RootWindowController::SetWallpaperController(
DesktopBackgroundWidgetController* controller) {
wallpaper_controller_.reset(controller);
@@ -228,6 +216,8 @@ void RootWindowController::SetAnimatingWallpaperController(
}
void RootWindowController::Shutdown() {
+ Shell::GetInstance()->RemoveShellObserver(this);
+
if (animating_wallpaper_controller_.get())
animating_wallpaper_controller_->StopAnimating();
wallpaper_controller_.reset();
@@ -292,6 +282,8 @@ void RootWindowController::Init(bool first_run_after_boot) {
GetSystemModalLayoutManager(NULL)->has_modal_background()) {
GetSystemModalLayoutManager(NULL)->CreateModalBackground();
}
+
+ Shell::GetInstance()->AddShellObserver(this);
}
void RootWindowController::ShowLauncher() {
@@ -308,10 +300,6 @@ void RootWindowController::OnLauncherCreated() {
docked_layout_manager_->SetLauncher(shelf_->launcher());
}
-void RootWindowController::OnLoginStateChanged(user::LoginStatus status) {
- shelf_->shelf_layout_manager()->UpdateVisibilityState();
-}
-
void RootWindowController::UpdateAfterLoginStatusChange(
user::LoginStatus status) {
if (shelf_->status_area_widget())
@@ -700,5 +688,28 @@ void RootWindowController::CreateContainersInRootWindow(
"PowerButtonAnimationContainer", root_window) ;
}
+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();
+}
+
+void RootWindowController::OnLoginStateChanged(user::LoginStatus status) {
+ shelf_->shelf_layout_manager()->UpdateVisibilityState();
+}
+
+void RootWindowController::OnTouchHudProjectionToggled(bool enabled) {
+ if (enabled)
+ EnableTouchHudProjection();
+ else
+ DisableTouchHudProjection();
+}
+
} // namespace internal
} // namespace ash
« no previous file with comments | « ash/root_window_controller.h ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698