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 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 | 643 |
644 void Shell::ToggleAppList(aura::Window* window) { | 644 void Shell::ToggleAppList(aura::Window* window) { |
645 // If the context window is not given, show it on the active root window. | 645 // If the context window is not given, show it on the active root window. |
646 if (!window) | 646 if (!window) |
647 window = GetActiveRootWindow(); | 647 window = GetActiveRootWindow(); |
648 if (!app_list_controller_) | 648 if (!app_list_controller_) |
649 app_list_controller_.reset(new internal::AppListController); | 649 app_list_controller_.reset(new internal::AppListController); |
650 app_list_controller_->SetVisible(!app_list_controller_->IsVisible(), window); | 650 app_list_controller_->SetVisible(!app_list_controller_->IsVisible(), window); |
651 } | 651 } |
652 | 652 |
| 653 void Shell::SetDragAndDropHostOfCurrentAppList( |
| 654 app_list::ApplicationDragAndDropHost* drag_and_drop_host) { |
| 655 if (app_list_controller_.get()) |
| 656 app_list_controller_->SetDragAndDropHostOfCurrentAppList( |
| 657 drag_and_drop_host); |
| 658 } |
| 659 |
653 bool Shell::GetAppListTargetVisibility() const { | 660 bool Shell::GetAppListTargetVisibility() const { |
654 return app_list_controller_.get() && | 661 return app_list_controller_.get() && |
655 app_list_controller_->GetTargetVisibility(); | 662 app_list_controller_->GetTargetVisibility(); |
656 } | 663 } |
657 | 664 |
658 aura::Window* Shell::GetAppListWindow() { | 665 aura::Window* Shell::GetAppListWindow() { |
659 return app_list_controller_.get() ? app_list_controller_->GetWindow() : NULL; | 666 return app_list_controller_.get() ? app_list_controller_->GetWindow() : NULL; |
660 } | 667 } |
661 | 668 |
662 bool Shell::IsSystemModalWindowOpen() const { | 669 bool Shell::IsSystemModalWindowOpen() const { |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
955 //////////////////////////////////////////////////////////////////////////////// | 962 //////////////////////////////////////////////////////////////////////////////// |
956 // Shell, aura::client::ActivationChangeObserver implementation: | 963 // Shell, aura::client::ActivationChangeObserver implementation: |
957 | 964 |
958 void Shell::OnWindowActivated(aura::Window* gained_active, | 965 void Shell::OnWindowActivated(aura::Window* gained_active, |
959 aura::Window* lost_active) { | 966 aura::Window* lost_active) { |
960 if (gained_active) | 967 if (gained_active) |
961 active_root_window_ = gained_active->GetRootWindow(); | 968 active_root_window_ = gained_active->GetRootWindow(); |
962 } | 969 } |
963 | 970 |
964 } // namespace ash | 971 } // namespace ash |
OLD | NEW |