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/focus_manager_factory.h" | 10 #include "ash/accelerators/focus_manager_factory.h" |
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 | 678 |
679 bool Shell::GetAppListTargetVisibility() const { | 679 bool Shell::GetAppListTargetVisibility() const { |
680 return app_list_controller_.get() && | 680 return app_list_controller_.get() && |
681 app_list_controller_->GetTargetVisibility(); | 681 app_list_controller_->GetTargetVisibility(); |
682 } | 682 } |
683 | 683 |
684 aura::Window* Shell::GetAppListWindow() { | 684 aura::Window* Shell::GetAppListWindow() { |
685 return app_list_controller_.get() ? app_list_controller_->GetWindow() : NULL; | 685 return app_list_controller_.get() ? app_list_controller_->GetWindow() : NULL; |
686 } | 686 } |
687 | 687 |
| 688 app_list::AppListView* Shell::GetAppListViewForTesting() { |
| 689 return app_list_controller_.get() ? |
| 690 app_list_controller_->GetViewForTesting() : |
| 691 NULL; |
| 692 } |
| 693 |
688 bool Shell::IsSystemModalWindowOpen() const { | 694 bool Shell::IsSystemModalWindowOpen() const { |
689 if (simulate_modal_window_open_for_testing_) | 695 if (simulate_modal_window_open_for_testing_) |
690 return true; | 696 return true; |
691 const std::vector<aura::Window*> containers = GetContainersFromAllRootWindows( | 697 const std::vector<aura::Window*> containers = GetContainersFromAllRootWindows( |
692 internal::kShellWindowId_SystemModalContainer, NULL); | 698 internal::kShellWindowId_SystemModalContainer, NULL); |
693 for (std::vector<aura::Window*>::const_iterator cit = containers.begin(); | 699 for (std::vector<aura::Window*>::const_iterator cit = containers.begin(); |
694 cit != containers.end(); ++cit) { | 700 cit != containers.end(); ++cit) { |
695 for (aura::Window::Windows::const_iterator wit = (*cit)->children().begin(); | 701 for (aura::Window::Windows::const_iterator wit = (*cit)->children().begin(); |
696 wit != (*cit)->children().end(); ++wit) { | 702 wit != (*cit)->children().end(); ++wit) { |
697 if ((*wit)->GetProperty(aura::client::kModalKey) == | 703 if ((*wit)->GetProperty(aura::client::kModalKey) == |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
977 //////////////////////////////////////////////////////////////////////////////// | 983 //////////////////////////////////////////////////////////////////////////////// |
978 // Shell, aura::client::ActivationChangeObserver implementation: | 984 // Shell, aura::client::ActivationChangeObserver implementation: |
979 | 985 |
980 void Shell::OnWindowActivated(aura::Window* gained_active, | 986 void Shell::OnWindowActivated(aura::Window* gained_active, |
981 aura::Window* lost_active) { | 987 aura::Window* lost_active) { |
982 if (gained_active) | 988 if (gained_active) |
983 target_root_window_ = gained_active->GetRootWindow(); | 989 target_root_window_ = gained_active->GetRootWindow(); |
984 } | 990 } |
985 | 991 |
986 } // namespace ash | 992 } // namespace ash |
OLD | NEW |