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 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 CHECK(rwc) << "root=" << root | 636 CHECK(rwc) << "root=" << root |
637 << ", location:" << location_in_screen.ToString(); | 637 << ", location:" << location_in_screen.ToString(); |
638 if (rwc) | 638 if (rwc) |
639 rwc->ShowContextMenu(location_in_screen); | 639 rwc->ShowContextMenu(location_in_screen); |
640 } | 640 } |
641 | 641 |
642 void Shell::ToggleAppList(aura::Window* window) { | 642 void Shell::ToggleAppList(aura::Window* window) { |
643 app_list_controller_->Toggle(window); | 643 app_list_controller_->Toggle(window); |
644 } | 644 } |
645 | 645 |
| 646 void Shell::SetDragAndDropHostOfCurrentAppList( |
| 647 app_list::ApplicationDragAndDropHost* drag_and_drop_host) { |
| 648 if (app_list_controller_.get()) |
| 649 app_list_controller_->SetDragAndDropHostOfCurrentAppList( |
| 650 drag_and_drop_host); |
| 651 } |
| 652 |
646 bool Shell::GetAppListTargetVisibility() const { | 653 bool Shell::GetAppListTargetVisibility() const { |
647 return app_list_controller_->GetTargetVisibility(); | 654 return app_list_controller_->GetTargetVisibility(); |
648 } | 655 } |
649 | 656 |
650 aura::Window* Shell::GetAppListWindow() { | 657 aura::Window* Shell::GetAppListWindow() { |
651 return app_list_controller_->GetWindow(); | 658 return app_list_controller_->GetWindow(); |
652 } | 659 } |
653 | 660 |
654 bool Shell::IsSystemModalWindowOpen() const { | 661 bool Shell::IsSystemModalWindowOpen() const { |
655 if (simulate_modal_window_open_for_testing_) | 662 if (simulate_modal_window_open_for_testing_) |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
947 //////////////////////////////////////////////////////////////////////////////// | 954 //////////////////////////////////////////////////////////////////////////////// |
948 // Shell, aura::client::ActivationChangeObserver implementation: | 955 // Shell, aura::client::ActivationChangeObserver implementation: |
949 | 956 |
950 void Shell::OnWindowActivated(aura::Window* gained_active, | 957 void Shell::OnWindowActivated(aura::Window* gained_active, |
951 aura::Window* lost_active) { | 958 aura::Window* lost_active) { |
952 if (gained_active) | 959 if (gained_active) |
953 active_root_window_ = gained_active->GetRootWindow(); | 960 active_root_window_ = gained_active->GetRootWindow(); |
954 } | 961 } |
955 | 962 |
956 } // namespace ash | 963 } // namespace ash |
OLD | NEW |