| 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 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 858 ShelfWidget* shelf = GetPrimaryRootWindowController()->shelf(); | 858 ShelfWidget* shelf = GetPrimaryRootWindowController()->shelf(); |
| 859 return shelf && shelf->status_area_widget(); | 859 return shelf && shelf->status_area_widget(); |
| 860 } | 860 } |
| 861 | 861 |
| 862 SystemTray* Shell::GetPrimarySystemTray() { | 862 SystemTray* Shell::GetPrimarySystemTray() { |
| 863 return GetPrimaryRootWindowController()->GetSystemTray(); | 863 return GetPrimaryRootWindowController()->GetSystemTray(); |
| 864 } | 864 } |
| 865 | 865 |
| 866 LauncherDelegate* Shell::GetLauncherDelegate() { | 866 LauncherDelegate* Shell::GetLauncherDelegate() { |
| 867 if (!launcher_delegate_) { | 867 if (!launcher_delegate_) { |
| 868 DCHECK(!launcher_model_.get()); |
| 868 launcher_model_.reset(new LauncherModel); | 869 launcher_model_.reset(new LauncherModel); |
| 869 launcher_delegate_.reset( | 870 launcher_delegate_.reset(new internal::LauncherDelegateProxy); |
| 870 delegate_->CreateLauncherDelegate(launcher_model_.get())); | |
| 871 } | 871 } |
| 872 return launcher_delegate_.get(); | 872 return launcher_delegate_.get(); |
| 873 } | 873 } |
| 874 | 874 |
| 875 void Shell::SetTouchHudProjectionEnabled(bool enabled) { | 875 void Shell::SetTouchHudProjectionEnabled(bool enabled) { |
| 876 if (is_touch_hud_projection_enabled_ == enabled) | 876 if (is_touch_hud_projection_enabled_ == enabled) |
| 877 return; | 877 return; |
| 878 | 878 |
| 879 is_touch_hud_projection_enabled_ = enabled; | 879 is_touch_hud_projection_enabled_ = enabled; |
| 880 FOR_EACH_OBSERVER(ShellObserver, observers_, | 880 FOR_EACH_OBSERVER(ShellObserver, observers_, |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 //////////////////////////////////////////////////////////////////////////////// | 977 //////////////////////////////////////////////////////////////////////////////// |
| 978 // Shell, aura::client::ActivationChangeObserver implementation: | 978 // Shell, aura::client::ActivationChangeObserver implementation: |
| 979 | 979 |
| 980 void Shell::OnWindowActivated(aura::Window* gained_active, | 980 void Shell::OnWindowActivated(aura::Window* gained_active, |
| 981 aura::Window* lost_active) { | 981 aura::Window* lost_active) { |
| 982 if (gained_active) | 982 if (gained_active) |
| 983 target_root_window_ = gained_active->GetRootWindow(); | 983 target_root_window_ = gained_active->GetRootWindow(); |
| 984 } | 984 } |
| 985 | 985 |
| 986 } // namespace ash | 986 } // namespace ash |
| OLD | NEW |