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()) || | |
flackr
2014/05/26 16:05:18
nit: I would indent maximize_mode_controller_ eith
jonross
2014/05/26 19:05:48
Done.
| |
483 resolution_notification_controller_->DoesNotificationTimeout()); | |
484 } | |
485 | |
480 void Shell::UpdateShelfVisibility() { | 486 void Shell::UpdateShelfVisibility() { |
481 RootWindowControllerList controllers = GetAllRootWindowControllers(); | 487 RootWindowControllerList controllers = GetAllRootWindowControllers(); |
482 for (RootWindowControllerList::iterator iter = controllers.begin(); | 488 for (RootWindowControllerList::iterator iter = controllers.begin(); |
483 iter != controllers.end(); ++iter) | 489 iter != controllers.end(); ++iter) |
484 if ((*iter)->shelf()) | 490 if ((*iter)->shelf()) |
485 (*iter)->UpdateShelfVisibility(); | 491 (*iter)->UpdateShelfVisibility(); |
486 } | 492 } |
487 | 493 |
488 void Shell::SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior, | 494 void Shell::SetShelfAutoHideBehavior(ShelfAutoHideBehavior behavior, |
489 aura::Window* root_window) { | 495 aura::Window* root_window) { |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1141 //////////////////////////////////////////////////////////////////////////////// | 1147 //////////////////////////////////////////////////////////////////////////////// |
1142 // Shell, aura::client::ActivationChangeObserver implementation: | 1148 // Shell, aura::client::ActivationChangeObserver implementation: |
1143 | 1149 |
1144 void Shell::OnWindowActivated(aura::Window* gained_active, | 1150 void Shell::OnWindowActivated(aura::Window* gained_active, |
1145 aura::Window* lost_active) { | 1151 aura::Window* lost_active) { |
1146 if (gained_active) | 1152 if (gained_active) |
1147 target_root_window_ = gained_active->GetRootWindow(); | 1153 target_root_window_ = gained_active->GetRootWindow(); |
1148 } | 1154 } |
1149 | 1155 |
1150 } // namespace ash | 1156 } // namespace ash |
OLD | NEW |