| 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 #include <utility> | 9 #include <utility> | 
| 10 | 10 | 
| (...skipping 13 matching lines...) Expand all  Loading... | 
| 24 #include "ash/common/shelf/shelf.h" | 24 #include "ash/common/shelf/shelf.h" | 
| 25 #include "ash/common/shelf/shelf_delegate.h" | 25 #include "ash/common/shelf/shelf_delegate.h" | 
| 26 #include "ash/common/shelf/shelf_item_delegate.h" | 26 #include "ash/common/shelf/shelf_item_delegate.h" | 
| 27 #include "ash/common/shelf/shelf_model.h" | 27 #include "ash/common/shelf/shelf_model.h" | 
| 28 #include "ash/common/shelf/shelf_widget.h" | 28 #include "ash/common/shelf/shelf_widget.h" | 
| 29 #include "ash/common/shell_delegate.h" | 29 #include "ash/common/shell_delegate.h" | 
| 30 #include "ash/common/shell_window_ids.h" | 30 #include "ash/common/shell_window_ids.h" | 
| 31 #include "ash/common/system/locale/locale_notification_controller.h" | 31 #include "ash/common/system/locale/locale_notification_controller.h" | 
| 32 #include "ash/common/system/status_area_widget.h" | 32 #include "ash/common/system/status_area_widget.h" | 
| 33 #include "ash/common/system/tray/system_tray_delegate.h" | 33 #include "ash/common/system/tray/system_tray_delegate.h" | 
|  | 34 #include "ash/common/wallpaper/wallpaper_delegate.h" | 
| 34 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" | 35 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" | 
| 35 #include "ash/common/wm/maximize_mode/maximize_mode_window_manager.h" | 36 #include "ash/common/wm/maximize_mode/maximize_mode_window_manager.h" | 
| 36 #include "ash/common/wm/mru_window_tracker.h" | 37 #include "ash/common/wm/mru_window_tracker.h" | 
| 37 #include "ash/common/wm/root_window_finder.h" | 38 #include "ash/common/wm/root_window_finder.h" | 
| 38 #include "ash/common/wm/window_positioner.h" | 39 #include "ash/common/wm/window_positioner.h" | 
| 39 #include "ash/common/wm_shell.h" | 40 #include "ash/common/wm_shell.h" | 
| 40 #include "ash/desktop_background/desktop_background_controller.h" | 41 #include "ash/desktop_background/desktop_background_controller.h" | 
| 41 #include "ash/desktop_background/desktop_background_view.h" | 42 #include "ash/desktop_background/desktop_background_view.h" | 
| 42 #include "ash/desktop_background/user_wallpaper_delegate.h" |  | 
| 43 #include "ash/display/cursor_window_controller.h" | 43 #include "ash/display/cursor_window_controller.h" | 
| 44 #include "ash/display/display_configuration_controller.h" | 44 #include "ash/display/display_configuration_controller.h" | 
| 45 #include "ash/display/display_manager.h" | 45 #include "ash/display/display_manager.h" | 
| 46 #include "ash/display/event_transformation_handler.h" | 46 #include "ash/display/event_transformation_handler.h" | 
| 47 #include "ash/display/mouse_cursor_event_filter.h" | 47 #include "ash/display/mouse_cursor_event_filter.h" | 
| 48 #include "ash/display/screen_position_controller.h" | 48 #include "ash/display/screen_position_controller.h" | 
| 49 #include "ash/display/window_tree_host_manager.h" | 49 #include "ash/display/window_tree_host_manager.h" | 
| 50 #include "ash/drag_drop/drag_drop_controller.h" | 50 #include "ash/drag_drop/drag_drop_controller.h" | 
| 51 #include "ash/first_run/first_run_helper_impl.h" | 51 #include "ash/first_run/first_run_helper_impl.h" | 
| 52 #include "ash/high_contrast/high_contrast_controller.h" | 52 #include "ash/high_contrast/high_contrast_controller.h" | 
| (...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 884   AddPreTargetHandler(tooltip_controller_.get()); | 884   AddPreTargetHandler(tooltip_controller_.get()); | 
| 885 | 885 | 
| 886   modality_filter_.reset(new SystemModalContainerEventFilter(this)); | 886   modality_filter_.reset(new SystemModalContainerEventFilter(this)); | 
| 887   AddPreTargetHandler(modality_filter_.get()); | 887   AddPreTargetHandler(modality_filter_.get()); | 
| 888 | 888 | 
| 889   event_client_.reset(new EventClientImpl); | 889   event_client_.reset(new EventClientImpl); | 
| 890 | 890 | 
| 891   // This controller needs to be set before SetupManagedWindowMode. | 891   // This controller needs to be set before SetupManagedWindowMode. | 
| 892   desktop_background_controller_.reset( | 892   desktop_background_controller_.reset( | 
| 893       new DesktopBackgroundController(blocking_pool_)); | 893       new DesktopBackgroundController(blocking_pool_)); | 
| 894   user_wallpaper_delegate_.reset( |  | 
| 895       wm_shell_->delegate()->CreateUserWallpaperDelegate()); |  | 
| 896 | 894 | 
| 897   session_state_delegate_.reset( | 895   session_state_delegate_.reset( | 
| 898       wm_shell_->delegate()->CreateSessionStateDelegate()); | 896       wm_shell_->delegate()->CreateSessionStateDelegate()); | 
| 899   wm_shell_->CreatePointerWatcherAdapter(); | 897   wm_shell_->CreatePointerWatcherAdapter(); | 
| 900 | 898 | 
| 901   resize_shadow_controller_.reset(new ResizeShadowController()); | 899   resize_shadow_controller_.reset(new ResizeShadowController()); | 
| 902   shadow_controller_.reset(new ::wm::ShadowController(activation_client_)); | 900   shadow_controller_.reset(new ::wm::ShadowController(activation_client_)); | 
| 903 | 901 | 
| 904   wm_shell_->SetSystemTrayDelegate( | 902   wm_shell_->SetSystemTrayDelegate( | 
| 905       base::WrapUnique(wm_shell_->delegate()->CreateSystemTrayDelegate())); | 903       base::WrapUnique(wm_shell_->delegate()->CreateSystemTrayDelegate())); | 
| (...skipping 18 matching lines...) Expand all  Loading... | 
| 924 #if defined(OS_CHROMEOS) | 922 #if defined(OS_CHROMEOS) | 
| 925   // Needs to be created after InitDisplays() since it may cause the virtual | 923   // Needs to be created after InitDisplays() since it may cause the virtual | 
| 926   // keyboard to be deployed. | 924   // keyboard to be deployed. | 
| 927   virtual_keyboard_controller_.reset(new VirtualKeyboardController); | 925   virtual_keyboard_controller_.reset(new VirtualKeyboardController); | 
| 928 #endif  // defined(OS_CHROMEOS) | 926 #endif  // defined(OS_CHROMEOS) | 
| 929 | 927 | 
| 930 #if defined(OS_CHROMEOS) | 928 #if defined(OS_CHROMEOS) | 
| 931   audio_a11y_controller_.reset(new chromeos::AudioA11yController); | 929   audio_a11y_controller_.reset(new chromeos::AudioA11yController); | 
| 932 #endif  // defined(OS_CHROMEOS) | 930 #endif  // defined(OS_CHROMEOS) | 
| 933 | 931 | 
| 934   // It needs to be created after RootWindowController has been created | 932   // Initialize the wallpaper after the RootWindowController has been created, | 
| 935   // (which calls OnWindowResized has been called, otherwise the | 933   // otherwise the widget will not paint when restoring after a browser crash. | 
| 936   // widget will not paint when restoring after a browser crash.  Also it needs | 934   // Also, initialize after display initialization to ensure correct sizing. | 
| 937   // to be created after InitSecondaryDisplays() to initialize the wallpapers in | 935   wm_shell_->wallpaper_delegate()->InitializeWallpaper(); | 
| 938   // the correct size. |  | 
| 939   user_wallpaper_delegate_->InitializeWallpaper(); |  | 
| 940 | 936 | 
| 941   if (cursor_manager_) { | 937   if (cursor_manager_) { | 
| 942     if (initially_hide_cursor_) | 938     if (initially_hide_cursor_) | 
| 943       cursor_manager_->HideCursor(); | 939       cursor_manager_->HideCursor(); | 
| 944     cursor_manager_->SetCursor(ui::kCursorPointer); | 940     cursor_manager_->SetCursor(ui::kCursorPointer); | 
| 945   } | 941   } | 
| 946 | 942 | 
| 947 #if defined(OS_CHROMEOS) | 943 #if defined(OS_CHROMEOS) | 
| 948   power_event_observer_.reset(new PowerEventObserver()); | 944   power_event_observer_.reset(new PowerEventObserver()); | 
| 949   user_activity_notifier_.reset( | 945   user_activity_notifier_.reset( | 
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1030 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const { | 1026 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const { | 
| 1031   return std::unique_ptr<ui::EventTargetIterator>(); | 1027   return std::unique_ptr<ui::EventTargetIterator>(); | 
| 1032 } | 1028 } | 
| 1033 | 1029 | 
| 1034 ui::EventTargeter* Shell::GetEventTargeter() { | 1030 ui::EventTargeter* Shell::GetEventTargeter() { | 
| 1035   NOTREACHED(); | 1031   NOTREACHED(); | 
| 1036   return nullptr; | 1032   return nullptr; | 
| 1037 } | 1033 } | 
| 1038 | 1034 | 
| 1039 }  // namespace ash | 1035 }  // namespace ash | 
| OLD | NEW | 
|---|