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 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 | 624 |
625 void Shell::ToggleAppList(aura::Window* window) { | 625 void Shell::ToggleAppList(aura::Window* window) { |
626 // If the context window is not given, show it on the active root window. | 626 // If the context window is not given, show it on the active root window. |
627 if (!window) | 627 if (!window) |
628 window = GetActiveRootWindow(); | 628 window = GetActiveRootWindow(); |
629 if (!app_list_controller_.get()) | 629 if (!app_list_controller_.get()) |
630 app_list_controller_.reset(new internal::AppListController); | 630 app_list_controller_.reset(new internal::AppListController); |
631 app_list_controller_->SetVisible(!app_list_controller_->IsVisible(), window); | 631 app_list_controller_->SetVisible(!app_list_controller_->IsVisible(), window); |
632 } | 632 } |
633 | 633 |
| 634 void Shell::SetAppListDnDHost(app_list::ApplicationDnDHost* dnd_host) { |
| 635 if (app_list_controller_.get()) |
| 636 app_list_controller_->SetAppListDnDHost(dnd_host); |
| 637 } |
| 638 |
634 bool Shell::GetAppListTargetVisibility() const { | 639 bool Shell::GetAppListTargetVisibility() const { |
635 return app_list_controller_.get() && | 640 return app_list_controller_.get() && |
636 app_list_controller_->GetTargetVisibility(); | 641 app_list_controller_->GetTargetVisibility(); |
637 } | 642 } |
638 | 643 |
639 aura::Window* Shell::GetAppListWindow() { | 644 aura::Window* Shell::GetAppListWindow() { |
640 return app_list_controller_.get() ? app_list_controller_->GetWindow() : NULL; | 645 return app_list_controller_.get() ? app_list_controller_->GetWindow() : NULL; |
641 } | 646 } |
642 | 647 |
643 bool Shell::CanLockScreen() { | 648 bool Shell::CanLockScreen() { |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
944 //////////////////////////////////////////////////////////////////////////////// | 949 //////////////////////////////////////////////////////////////////////////////// |
945 // Shell, aura::client::ActivationChangeObserver implementation: | 950 // Shell, aura::client::ActivationChangeObserver implementation: |
946 | 951 |
947 void Shell::OnWindowActivated(aura::Window* gained_active, | 952 void Shell::OnWindowActivated(aura::Window* gained_active, |
948 aura::Window* lost_active) { | 953 aura::Window* lost_active) { |
949 if (gained_active) | 954 if (gained_active) |
950 active_root_window_ = gained_active->GetRootWindow(); | 955 active_root_window_ = gained_active->GetRootWindow(); |
951 } | 956 } |
952 | 957 |
953 } // namespace ash | 958 } // namespace ash |
OLD | NEW |