| 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/launcher_delegate.h" | 26 #include "ash/launcher/launcher_delegate_proxy.h" |
| 27 #include "ash/launcher/launcher_model.h" | 27 #include "ash/launcher/launcher_model.h" |
| 28 #include "ash/magnifier/magnification_controller.h" | 28 #include "ash/magnifier/magnification_controller.h" |
| 29 #include "ash/magnifier/partial_magnification_controller.h" | 29 #include "ash/magnifier/partial_magnification_controller.h" |
| 30 #include "ash/root_window_controller.h" | 30 #include "ash/root_window_controller.h" |
| 31 #include "ash/screen_ash.h" | 31 #include "ash/screen_ash.h" |
| 32 #include "ash/session_state_delegate.h" | 32 #include "ash/session_state_delegate.h" |
| 33 #include "ash/shelf/shelf_layout_manager.h" | 33 #include "ash/shelf/shelf_layout_manager.h" |
| 34 #include "ash/shelf/shelf_widget.h" | 34 #include "ash/shelf/shelf_widget.h" |
| 35 #include "ash/shell_delegate.h" | 35 #include "ash/shell_delegate.h" |
| 36 #include "ash/shell_factory.h" | 36 #include "ash/shell_factory.h" |
| (...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 ShelfWidget* shelf = GetPrimaryRootWindowController()->shelf(); | 863 ShelfWidget* shelf = GetPrimaryRootWindowController()->shelf(); |
| 864 return shelf && shelf->status_area_widget(); | 864 return shelf && shelf->status_area_widget(); |
| 865 } | 865 } |
| 866 | 866 |
| 867 SystemTray* Shell::GetPrimarySystemTray() { | 867 SystemTray* Shell::GetPrimarySystemTray() { |
| 868 return GetPrimaryRootWindowController()->GetSystemTray(); | 868 return GetPrimaryRootWindowController()->GetSystemTray(); |
| 869 } | 869 } |
| 870 | 870 |
| 871 LauncherDelegate* Shell::GetLauncherDelegate() { | 871 LauncherDelegate* Shell::GetLauncherDelegate() { |
| 872 if (!launcher_delegate_) { | 872 if (!launcher_delegate_) { |
| 873 DCHECK(!launcher_model_.get()); |
| 873 launcher_model_.reset(new LauncherModel); | 874 launcher_model_.reset(new LauncherModel); |
| 874 launcher_delegate_.reset( | 875 launcher_delegate_.reset(new internal::LauncherDelegateProxy); |
| 875 delegate_->CreateLauncherDelegate(launcher_model_.get())); | |
| 876 } | 876 } |
| 877 return launcher_delegate_.get(); | 877 return launcher_delegate_.get(); |
| 878 } | 878 } |
| 879 | 879 |
| 880 void Shell::SetTouchHudProjectionEnabled(bool enabled) { | 880 void Shell::SetTouchHudProjectionEnabled(bool enabled) { |
| 881 if (is_touch_hud_projection_enabled_ == enabled) | 881 if (is_touch_hud_projection_enabled_ == enabled) |
| 882 return; | 882 return; |
| 883 | 883 |
| 884 is_touch_hud_projection_enabled_ = enabled; | 884 is_touch_hud_projection_enabled_ = enabled; |
| 885 FOR_EACH_OBSERVER(ShellObserver, observers_, | 885 FOR_EACH_OBSERVER(ShellObserver, observers_, |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 984 //////////////////////////////////////////////////////////////////////////////// | 984 //////////////////////////////////////////////////////////////////////////////// |
| 985 // Shell, aura::client::ActivationChangeObserver implementation: | 985 // Shell, aura::client::ActivationChangeObserver implementation: |
| 986 | 986 |
| 987 void Shell::OnWindowActivated(aura::Window* gained_active, | 987 void Shell::OnWindowActivated(aura::Window* gained_active, |
| 988 aura::Window* lost_active) { | 988 aura::Window* lost_active) { |
| 989 if (gained_active) | 989 if (gained_active) |
| 990 target_root_window_ = gained_active->GetRootWindow(); | 990 target_root_window_ = gained_active->GetRootWindow(); |
| 991 } | 991 } |
| 992 | 992 |
| 993 } // namespace ash | 993 } // namespace ash |
| OLD | NEW |