| 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" |
| 11 #include "ash/ash_switches.h" | 11 #include "ash/ash_switches.h" |
| 12 #include "ash/caps_lock_delegate.h" | 12 #include "ash/caps_lock_delegate.h" |
| 13 #include "ash/desktop_background/desktop_background_controller.h" | 13 #include "ash/desktop_background/desktop_background_controller.h" |
| 14 #include "ash/desktop_background/desktop_background_view.h" | 14 #include "ash/desktop_background/desktop_background_view.h" |
| 15 #include "ash/desktop_background/user_wallpaper_delegate.h" | 15 #include "ash/desktop_background/user_wallpaper_delegate.h" |
| 16 #include "ash/display/display_controller.h" | 16 #include "ash/display/display_controller.h" |
| 17 #include "ash/display/display_manager.h" | 17 #include "ash/display/display_manager.h" |
| 18 #include "ash/display/event_transformation_handler.h" | 18 #include "ash/display/event_transformation_handler.h" |
| 19 #include "ash/display/mouse_cursor_event_filter.h" | 19 #include "ash/display/mouse_cursor_event_filter.h" |
| 20 #include "ash/display/resolution_notification_controller.h" | 20 #include "ash/display/resolution_notification_controller.h" |
| 21 #include "ash/display/screen_position_controller.h" | 21 #include "ash/display/screen_position_controller.h" |
| 22 #include "ash/drag_drop/drag_drop_controller.h" | 22 #include "ash/drag_drop/drag_drop_controller.h" |
| 23 #include "ash/focus_cycler.h" | 23 #include "ash/focus_cycler.h" |
| 24 #include "ash/high_contrast/high_contrast_controller.h" | 24 #include "ash/high_contrast/high_contrast_controller.h" |
| 25 #include "ash/host/root_window_host_factory.h" | 25 #include "ash/host/root_window_host_factory.h" |
| 26 #include "ash/launcher/app_list_launcher_item_delegate.h" |
| 26 #include "ash/launcher/launcher_delegate.h" | 27 #include "ash/launcher/launcher_delegate.h" |
| 28 #include "ash/launcher/launcher_item_delegate.h" |
| 29 #include "ash/launcher/launcher_item_delegate_manager.h" |
| 27 #include "ash/launcher/launcher_model.h" | 30 #include "ash/launcher/launcher_model.h" |
| 28 #include "ash/magnifier/magnification_controller.h" | 31 #include "ash/magnifier/magnification_controller.h" |
| 29 #include "ash/magnifier/partial_magnification_controller.h" | 32 #include "ash/magnifier/partial_magnification_controller.h" |
| 30 #include "ash/root_window_controller.h" | 33 #include "ash/root_window_controller.h" |
| 31 #include "ash/screen_ash.h" | 34 #include "ash/screen_ash.h" |
| 32 #include "ash/session_state_delegate.h" | 35 #include "ash/session_state_delegate.h" |
| 33 #include "ash/shelf/shelf_layout_manager.h" | 36 #include "ash/shelf/shelf_layout_manager.h" |
| 34 #include "ash/shelf/shelf_widget.h" | 37 #include "ash/shelf/shelf_widget.h" |
| 35 #include "ash/shell_delegate.h" | 38 #include "ash/shell_delegate.h" |
| 36 #include "ash/shell_factory.h" | 39 #include "ash/shell_factory.h" |
| (...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 858 ShelfWidget* shelf = GetPrimaryRootWindowController()->shelf(); | 861 ShelfWidget* shelf = GetPrimaryRootWindowController()->shelf(); |
| 859 return shelf && shelf->status_area_widget(); | 862 return shelf && shelf->status_area_widget(); |
| 860 } | 863 } |
| 861 | 864 |
| 862 SystemTray* Shell::GetPrimarySystemTray() { | 865 SystemTray* Shell::GetPrimarySystemTray() { |
| 863 return GetPrimaryRootWindowController()->GetSystemTray(); | 866 return GetPrimaryRootWindowController()->GetSystemTray(); |
| 864 } | 867 } |
| 865 | 868 |
| 866 LauncherDelegate* Shell::GetLauncherDelegate() { | 869 LauncherDelegate* Shell::GetLauncherDelegate() { |
| 867 if (!launcher_delegate_) { | 870 if (!launcher_delegate_) { |
| 871 // Creates LauncherItemDelegateManager before LauncherDelegate. |
| 872 launcher_item_delegate_manager_.reset(new LauncherItemDelegateManager); |
| 868 launcher_model_.reset(new LauncherModel); | 873 launcher_model_.reset(new LauncherModel); |
| 869 launcher_delegate_.reset( | 874 launcher_delegate_.reset( |
| 870 delegate_->CreateLauncherDelegate(launcher_model_.get())); | 875 delegate_->CreateLauncherDelegate(launcher_model_.get())); |
| 876 app_list_launcher_item_delegate_.reset( |
| 877 new internal::AppListLauncherItemDelegate); |
| 871 } | 878 } |
| 872 return launcher_delegate_.get(); | 879 return launcher_delegate_.get(); |
| 873 } | 880 } |
| 874 | 881 |
| 875 void Shell::SetTouchHudProjectionEnabled(bool enabled) { | 882 void Shell::SetTouchHudProjectionEnabled(bool enabled) { |
| 876 if (is_touch_hud_projection_enabled_ == enabled) | 883 if (is_touch_hud_projection_enabled_ == enabled) |
| 877 return; | 884 return; |
| 878 | 885 |
| 879 is_touch_hud_projection_enabled_ = enabled; | 886 is_touch_hud_projection_enabled_ = enabled; |
| 880 FOR_EACH_OBSERVER(ShellObserver, observers_, | 887 FOR_EACH_OBSERVER(ShellObserver, observers_, |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 //////////////////////////////////////////////////////////////////////////////// | 984 //////////////////////////////////////////////////////////////////////////////// |
| 978 // Shell, aura::client::ActivationChangeObserver implementation: | 985 // Shell, aura::client::ActivationChangeObserver implementation: |
| 979 | 986 |
| 980 void Shell::OnWindowActivated(aura::Window* gained_active, | 987 void Shell::OnWindowActivated(aura::Window* gained_active, |
| 981 aura::Window* lost_active) { | 988 aura::Window* lost_active) { |
| 982 if (gained_active) | 989 if (gained_active) |
| 983 target_root_window_ = gained_active->GetRootWindow(); | 990 target_root_window_ = gained_active->GetRootWindow(); |
| 984 } | 991 } |
| 985 | 992 |
| 986 } // namespace ash | 993 } // namespace ash |
| OLD | NEW |