| OLD | NEW |
| 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 Loading... |
| 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 bool Shell::ShouldSaveDisplaySettings() { |
| 481 return !(IsMaximizeModeWindowManagerEnabled() && |
| 482 maximize_mode_controller_->in_set_screen_rotation()); |
| 483 } |
| 484 |
| 480 void Shell::UpdateShelfVisibility() { | 485 void Shell::UpdateShelfVisibility() { |
| 481 RootWindowControllerList controllers = GetAllRootWindowControllers(); | 486 RootWindowControllerList controllers = GetAllRootWindowControllers(); |
| 482 for (RootWindowControllerList::iterator iter = controllers.begin(); | 487 for (RootWindowControllerList::iterator iter = controllers.begin(); |
| 483 iter != controllers.end(); ++iter) | 488 iter != controllers.end(); ++iter) |
| 484 if ((*iter)->shelf()) | 489 if ((*iter)->shelf()) |
| 485 (*iter)->UpdateShelfVisibility(); | 490 (*iter)->UpdateShelfVisibility(); |
| 486 } | 491 } |
| 487 | 492 |
| 488 void Shell::SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior, | 493 void Shell::SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior, |
| 489 aura::Window* root_window) { | 494 aura::Window* root_window) { |
| (...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1141 //////////////////////////////////////////////////////////////////////////////// | 1146 //////////////////////////////////////////////////////////////////////////////// |
| 1142 // Shell, aura::client::ActivationChangeObserver implementation: | 1147 // Shell, aura::client::ActivationChangeObserver implementation: |
| 1143 | 1148 |
| 1144 void Shell::OnWindowActivated(aura::Window* gained_active, | 1149 void Shell::OnWindowActivated(aura::Window* gained_active, |
| 1145 aura::Window* lost_active) { | 1150 aura::Window* lost_active) { |
| 1146 if (gained_active) | 1151 if (gained_active) |
| 1147 target_root_window_ = gained_active->GetRootWindow(); | 1152 target_root_window_ = gained_active->GetRootWindow(); |
| 1148 } | 1153 } |
| 1149 | 1154 |
| 1150 } // namespace ash | 1155 } // namespace ash |
| OLD | NEW |