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

Side by Side Diff: ash/shell.cc

Issue 289583002: Lock rotation when screen is manually rotated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix non chromeOS builds Created 6 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 unified diff | Download patch
« no previous file with comments | « ash/shell.h ('k') | ash/wm/maximize_mode/maximize_mode_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "ash/accelerators/accelerator_controller.h" 10 #include "ash/accelerators/accelerator_controller.h"
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 maximize_mode_window_manager_.reset(new MaximizeModeWindowManager()); 470 maximize_mode_window_manager_.reset(new MaximizeModeWindowManager());
471 } else if (!enable && maximize_mode_window_manager_.get()) { 471 } else if (!enable && maximize_mode_window_manager_.get()) {
472 maximize_mode_window_manager_.reset(); 472 maximize_mode_window_manager_.reset();
473 } 473 }
474 } 474 }
475 475
476 bool Shell::IsMaximizeModeWindowManagerEnabled() { 476 bool Shell::IsMaximizeModeWindowManagerEnabled() {
477 return maximize_mode_window_manager_.get() != NULL; 477 return maximize_mode_window_manager_.get() != NULL;
478 } 478 }
479 479
480 #if defined(OS_CHROMEOS)
481 bool Shell::ShouldSaveDisplaySettings() {
482 return !((IsMaximizeModeWindowManagerEnabled() &&
483 maximize_mode_controller_->in_set_screen_rotation()) ||
484 resolution_notification_controller_->DoesNotificationTimeout());
485 }
486 #endif
487
480 void Shell::UpdateShelfVisibility() { 488 void Shell::UpdateShelfVisibility() {
481 RootWindowControllerList controllers = GetAllRootWindowControllers(); 489 RootWindowControllerList controllers = GetAllRootWindowControllers();
482 for (RootWindowControllerList::iterator iter = controllers.begin(); 490 for (RootWindowControllerList::iterator iter = controllers.begin();
483 iter != controllers.end(); ++iter) 491 iter != controllers.end(); ++iter)
484 if ((*iter)->shelf()) 492 if ((*iter)->shelf())
485 (*iter)->UpdateShelfVisibility(); 493 (*iter)->UpdateShelfVisibility();
486 } 494 }
487 495
488 void Shell::SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior, 496 void Shell::SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior,
489 aura::Window* root_window) { 497 aura::Window* root_window) {
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 //////////////////////////////////////////////////////////////////////////////// 1149 ////////////////////////////////////////////////////////////////////////////////
1142 // Shell, aura::client::ActivationChangeObserver implementation: 1150 // Shell, aura::client::ActivationChangeObserver implementation:
1143 1151
1144 void Shell::OnWindowActivated(aura::Window* gained_active, 1152 void Shell::OnWindowActivated(aura::Window* gained_active,
1145 aura::Window* lost_active) { 1153 aura::Window* lost_active) {
1146 if (gained_active) 1154 if (gained_active)
1147 target_root_window_ = gained_active->GetRootWindow(); 1155 target_root_window_ = gained_active->GetRootWindow();
1148 } 1156 }
1149 1157
1150 } // namespace ash 1158 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.h ('k') | ash/wm/maximize_mode/maximize_mode_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698