| 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 841 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   894   AddPreTargetHandler(tooltip_controller_.get()); |   894   AddPreTargetHandler(tooltip_controller_.get()); | 
|   895  |   895  | 
|   896   modality_filter_.reset(new SystemModalContainerEventFilter(this)); |   896   modality_filter_.reset(new SystemModalContainerEventFilter(this)); | 
|   897   AddPreTargetHandler(modality_filter_.get()); |   897   AddPreTargetHandler(modality_filter_.get()); | 
|   898  |   898  | 
|   899   event_client_.reset(new EventClientImpl); |   899   event_client_.reset(new EventClientImpl); | 
|   900  |   900  | 
|   901   // This controller needs to be set before SetupManagedWindowMode. |   901   // This controller needs to be set before SetupManagedWindowMode. | 
|   902   desktop_background_controller_.reset( |   902   desktop_background_controller_.reset( | 
|   903       new DesktopBackgroundController(blocking_pool_)); |   903       new DesktopBackgroundController(blocking_pool_)); | 
|   904   user_wallpaper_delegate_.reset( |  | 
|   905       wm_shell_->delegate()->CreateUserWallpaperDelegate()); |  | 
|   906  |   904  | 
|   907   session_state_delegate_.reset( |   905   session_state_delegate_.reset( | 
|   908       wm_shell_->delegate()->CreateSessionStateDelegate()); |   906       wm_shell_->delegate()->CreateSessionStateDelegate()); | 
|   909   wm_shell_->CreatePointerWatcherAdapter(); |   907   wm_shell_->CreatePointerWatcherAdapter(); | 
|   910  |   908  | 
|   911   resize_shadow_controller_.reset(new ResizeShadowController()); |   909   resize_shadow_controller_.reset(new ResizeShadowController()); | 
|   912   shadow_controller_.reset(new ::wm::ShadowController(activation_client_)); |   910   shadow_controller_.reset(new ::wm::ShadowController(activation_client_)); | 
|   913  |   911  | 
|   914   wm_shell_->SetSystemTrayDelegate( |   912   wm_shell_->SetSystemTrayDelegate( | 
|   915       base::WrapUnique(wm_shell_->delegate()->CreateSystemTrayDelegate())); |   913       base::WrapUnique(wm_shell_->delegate()->CreateSystemTrayDelegate())); | 
| (...skipping 18 matching lines...) Expand all  Loading... | 
|   934 #if defined(OS_CHROMEOS) |   932 #if defined(OS_CHROMEOS) | 
|   935   // Needs to be created after InitDisplays() since it may cause the virtual |   933   // Needs to be created after InitDisplays() since it may cause the virtual | 
|   936   // keyboard to be deployed. |   934   // keyboard to be deployed. | 
|   937   virtual_keyboard_controller_.reset(new VirtualKeyboardController); |   935   virtual_keyboard_controller_.reset(new VirtualKeyboardController); | 
|   938 #endif  // defined(OS_CHROMEOS) |   936 #endif  // defined(OS_CHROMEOS) | 
|   939  |   937  | 
|   940 #if defined(OS_CHROMEOS) |   938 #if defined(OS_CHROMEOS) | 
|   941   audio_a11y_controller_.reset(new chromeos::AudioA11yController); |   939   audio_a11y_controller_.reset(new chromeos::AudioA11yController); | 
|   942 #endif  // defined(OS_CHROMEOS) |   940 #endif  // defined(OS_CHROMEOS) | 
|   943  |   941  | 
|   944   // It needs to be created after RootWindowController has been created |   942   // Initialize the wallpaper after the RootWindowController has been created, | 
|   945   // (which calls OnWindowResized has been called, otherwise the |   943   // otherwise the widget will not paint when restoring after a browser crash. | 
|   946   // widget will not paint when restoring after a browser crash.  Also it needs |   944   // Also, initialize after display initialization to ensure correct sizing. | 
|   947   // to be created after InitSecondaryDisplays() to initialize the wallpapers in |   945   wm_shell_->wallpaper_delegate()->InitializeWallpaper(); | 
|   948   // the correct size. |  | 
|   949   user_wallpaper_delegate_->InitializeWallpaper(); |  | 
|   950  |   946  | 
|   951   if (cursor_manager_) { |   947   if (cursor_manager_) { | 
|   952     if (initially_hide_cursor_) |   948     if (initially_hide_cursor_) | 
|   953       cursor_manager_->HideCursor(); |   949       cursor_manager_->HideCursor(); | 
|   954     cursor_manager_->SetCursor(ui::kCursorPointer); |   950     cursor_manager_->SetCursor(ui::kCursorPointer); | 
|   955   } |   951   } | 
|   956  |   952  | 
|   957 #if defined(OS_CHROMEOS) |   953 #if defined(OS_CHROMEOS) | 
|   958   power_event_observer_.reset(new PowerEventObserver()); |   954   power_event_observer_.reset(new PowerEventObserver()); | 
|   959   user_activity_notifier_.reset( |   955   user_activity_notifier_.reset( | 
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1040 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const { |  1036 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const { | 
|  1041   return std::unique_ptr<ui::EventTargetIterator>(); |  1037   return std::unique_ptr<ui::EventTargetIterator>(); | 
|  1042 } |  1038 } | 
|  1043  |  1039  | 
|  1044 ui::EventTargeter* Shell::GetEventTargeter() { |  1040 ui::EventTargeter* Shell::GetEventTargeter() { | 
|  1045   NOTREACHED(); |  1041   NOTREACHED(); | 
|  1046   return nullptr; |  1042   return nullptr; | 
|  1047 } |  1043 } | 
|  1048  |  1044  | 
|  1049 }  // namespace ash |  1045 }  // namespace ash | 
| OLD | NEW |