Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(567)

Side by Side Diff: ash/common/wm_shell.cc

Issue 2434463004: mash: Move directly linked NewWindowDelegate to mojom::NewWindowClient. (Closed)
Patch Set: Rebase to ToT Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/common/wm_shell.h ('k') | ash/display/display_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/common/wm_shell.h" 5 #include "ash/common/wm_shell.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/common/accelerators/accelerator_controller.h" 9 #include "ash/common/accelerators/accelerator_controller.h"
10 #include "ash/common/accelerators/ash_focus_manager_factory.h" 10 #include "ash/common/accelerators/ash_focus_manager_factory.h"
11 #include "ash/common/accessibility_delegate.h" 11 #include "ash/common/accessibility_delegate.h"
12 #include "ash/common/focus_cycler.h" 12 #include "ash/common/focus_cycler.h"
13 #include "ash/common/keyboard/keyboard_ui.h" 13 #include "ash/common/keyboard/keyboard_ui.h"
14 #include "ash/common/new_window_delegate.h" 14 #include "ash/common/new_window_client_proxy.h"
15 #include "ash/common/palette_delegate.h" 15 #include "ash/common/palette_delegate.h"
16 #include "ash/common/session/session_state_delegate.h" 16 #include "ash/common/session/session_state_delegate.h"
17 #include "ash/common/shelf/app_list_shelf_item_delegate.h" 17 #include "ash/common/shelf/app_list_shelf_item_delegate.h"
18 #include "ash/common/shelf/shelf_controller.h" 18 #include "ash/common/shelf/shelf_controller.h"
19 #include "ash/common/shelf/shelf_delegate.h" 19 #include "ash/common/shelf/shelf_delegate.h"
20 #include "ash/common/shelf/shelf_model.h" 20 #include "ash/common/shelf/shelf_model.h"
21 #include "ash/common/shelf/shelf_window_watcher.h" 21 #include "ash/common/shelf/shelf_window_watcher.h"
22 #include "ash/common/shell_delegate.h" 22 #include "ash/common/shell_delegate.h"
23 #include "ash/common/system/brightness_control_delegate.h" 23 #include "ash/common/system/brightness_control_delegate.h"
24 #include "ash/common/system/keyboard_brightness_control_delegate.h" 24 #include "ash/common/system/keyboard_brightness_control_delegate.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 palette_delegate_ = delegate_->CreatePaletteDelegate(); 77 palette_delegate_ = delegate_->CreatePaletteDelegate();
78 toast_manager_.reset(new ToastManager); 78 toast_manager_.reset(new ToastManager);
79 79
80 // Create the app list item in the shelf data model. 80 // Create the app list item in the shelf data model.
81 AppListShelfItemDelegate::CreateAppListItemAndDelegate(shelf_model()); 81 AppListShelfItemDelegate::CreateAppListItemAndDelegate(shelf_model());
82 82
83 // Install the custom factory early on so that views::FocusManagers for Tray, 83 // Install the custom factory early on so that views::FocusManagers for Tray,
84 // Shelf, and WallPaper could be created by the factory. 84 // Shelf, and WallPaper could be created by the factory.
85 views::FocusManagerFactory::Install(new AshFocusManagerFactory); 85 views::FocusManagerFactory::Install(new AshFocusManagerFactory);
86 86
87 new_window_delegate_.reset(delegate_->CreateNewWindowDelegate());
88
89 wallpaper_controller_.reset(new WallpaperController(blocking_pool_)); 87 wallpaper_controller_.reset(new WallpaperController(blocking_pool_));
90 } 88 }
91 89
92 void WmShell::Shutdown() { 90 void WmShell::Shutdown() {
93 // These members access WmShell in their destructors. 91 // These members access WmShell in their destructors.
94 wallpaper_controller_.reset(); 92 wallpaper_controller_.reset();
95 accessibility_delegate_.reset(); 93 accessibility_delegate_.reset();
96 94
97 // ShelfWindowWatcher has window observers and a pointer to the shelf model. 95 // ShelfWindowWatcher has window observers and a pointer to the shelf model.
98 shelf_window_watcher_.reset(); 96 shelf_window_watcher_.reset();
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 std::unique_ptr<PaletteDelegate> palette_delegate) { 227 std::unique_ptr<PaletteDelegate> palette_delegate) {
230 palette_delegate_ = std::move(palette_delegate); 228 palette_delegate_ = std::move(palette_delegate);
231 } 229 }
232 230
233 WmShell::WmShell(std::unique_ptr<ShellDelegate> shell_delegate) 231 WmShell::WmShell(std::unique_ptr<ShellDelegate> shell_delegate)
234 : delegate_(std::move(shell_delegate)), 232 : delegate_(std::move(shell_delegate)),
235 focus_cycler_(base::MakeUnique<FocusCycler>()), 233 focus_cycler_(base::MakeUnique<FocusCycler>()),
236 immersive_context_(base::MakeUnique<ImmersiveContextAsh>()), 234 immersive_context_(base::MakeUnique<ImmersiveContextAsh>()),
237 locale_notification_controller_( 235 locale_notification_controller_(
238 base::MakeUnique<LocaleNotificationController>()), 236 base::MakeUnique<LocaleNotificationController>()),
237 new_window_client_(base::MakeUnique<NewWindowClientProxy>(
238 delegate_->GetShellConnector())),
239 shelf_controller_(base::MakeUnique<ShelfController>()), 239 shelf_controller_(base::MakeUnique<ShelfController>()),
240 system_tray_controller_(base::MakeUnique<SystemTrayController>( 240 system_tray_controller_(base::MakeUnique<SystemTrayController>(
241 delegate_->GetShellConnector())), 241 delegate_->GetShellConnector())),
242 system_tray_notifier_(base::MakeUnique<SystemTrayNotifier>()), 242 system_tray_notifier_(base::MakeUnique<SystemTrayNotifier>()),
243 wallpaper_delegate_(delegate_->CreateWallpaperDelegate()), 243 wallpaper_delegate_(delegate_->CreateWallpaperDelegate()),
244 window_cycle_controller_(base::MakeUnique<WindowCycleController>()), 244 window_cycle_controller_(base::MakeUnique<WindowCycleController>()),
245 window_selector_controller_( 245 window_selector_controller_(
246 base::MakeUnique<WindowSelectorController>()) { 246 base::MakeUnique<WindowSelectorController>()) {
247 #if defined(OS_CHROMEOS) 247 #if defined(OS_CHROMEOS)
248 brightness_control_delegate_.reset(new system::BrightnessControllerChromeos); 248 brightness_control_delegate_.reset(new system::BrightnessControllerChromeos);
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 void WmShell::DeleteToastManager() { 383 void WmShell::DeleteToastManager() {
384 toast_manager_.reset(); 384 toast_manager_.reset();
385 } 385 }
386 386
387 void WmShell::SetAcceleratorController( 387 void WmShell::SetAcceleratorController(
388 std::unique_ptr<AcceleratorController> accelerator_controller) { 388 std::unique_ptr<AcceleratorController> accelerator_controller) {
389 accelerator_controller_ = std::move(accelerator_controller); 389 accelerator_controller_ = std::move(accelerator_controller);
390 } 390 }
391 391
392 } // namespace ash 392 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm_shell.h ('k') | ash/display/display_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698