| 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 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 void Shell::AddShellObserver(ShellObserver* observer) { | 479 void Shell::AddShellObserver(ShellObserver* observer) { |
| 480 observers_.AddObserver(observer); | 480 observers_.AddObserver(observer); |
| 481 } | 481 } |
| 482 | 482 |
| 483 void Shell::RemoveShellObserver(ShellObserver* observer) { | 483 void Shell::RemoveShellObserver(ShellObserver* observer) { |
| 484 observers_.RemoveObserver(observer); | 484 observers_.RemoveObserver(observer); |
| 485 } | 485 } |
| 486 | 486 |
| 487 #if defined(OS_CHROMEOS) | 487 #if defined(OS_CHROMEOS) |
| 488 bool Shell::ShouldSaveDisplaySettings() { | 488 bool Shell::ShouldSaveDisplaySettings() { |
| 489 // TODO(oshima): Allow saving the settings even in unified desktop mode. | |
| 490 return !(screen_orientation_controller_ | 489 return !(screen_orientation_controller_ |
| 491 ->ignore_display_configuration_updates() || | 490 ->ignore_display_configuration_updates() || |
| 492 resolution_notification_controller_->DoesNotificationTimeout()) && | 491 resolution_notification_controller_->DoesNotificationTimeout()); |
| 493 !switches::UnifiedDesktopEnabled(); | |
| 494 } | 492 } |
| 495 #endif | 493 #endif |
| 496 | 494 |
| 497 void Shell::UpdateShelfVisibility() { | 495 void Shell::UpdateShelfVisibility() { |
| 498 RootWindowControllerList controllers = GetAllRootWindowControllers(); | 496 RootWindowControllerList controllers = GetAllRootWindowControllers(); |
| 499 for (RootWindowControllerList::iterator iter = controllers.begin(); | 497 for (RootWindowControllerList::iterator iter = controllers.begin(); |
| 500 iter != controllers.end(); ++iter) | 498 iter != controllers.end(); ++iter) |
| 501 if ((*iter)->shelf()) | 499 if ((*iter)->shelf()) |
| 502 (*iter)->UpdateShelfVisibility(); | 500 (*iter)->UpdateShelfVisibility(); |
| 503 } | 501 } |
| (...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1176 //////////////////////////////////////////////////////////////////////////////// | 1174 //////////////////////////////////////////////////////////////////////////////// |
| 1177 // Shell, aura::client::ActivationChangeObserver implementation: | 1175 // Shell, aura::client::ActivationChangeObserver implementation: |
| 1178 | 1176 |
| 1179 void Shell::OnWindowActivated(aura::Window* gained_active, | 1177 void Shell::OnWindowActivated(aura::Window* gained_active, |
| 1180 aura::Window* lost_active) { | 1178 aura::Window* lost_active) { |
| 1181 if (gained_active) | 1179 if (gained_active) |
| 1182 target_root_window_ = gained_active->GetRootWindow(); | 1180 target_root_window_ = gained_active->GetRootWindow(); |
| 1183 } | 1181 } |
| 1184 | 1182 |
| 1185 } // namespace ash | 1183 } // namespace ash |
| OLD | NEW |