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

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

Issue 2192613002: Moves NewWindowDelegate to ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: order Created 4 years, 4 months 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/session/session_state_delegate.h" 15 #include "ash/common/session/session_state_delegate.h"
15 #include "ash/common/shelf/app_list_shelf_item_delegate.h" 16 #include "ash/common/shelf/app_list_shelf_item_delegate.h"
16 #include "ash/common/shelf/shelf_delegate.h" 17 #include "ash/common/shelf/shelf_delegate.h"
17 #include "ash/common/shelf/shelf_model.h" 18 #include "ash/common/shelf/shelf_model.h"
18 #include "ash/common/shell_delegate.h" 19 #include "ash/common/shell_delegate.h"
19 #include "ash/common/shell_window_ids.h" 20 #include "ash/common/shell_window_ids.h"
20 #include "ash/common/system/brightness_control_delegate.h" 21 #include "ash/common/system/brightness_control_delegate.h"
21 #include "ash/common/system/keyboard_brightness_control_delegate.h" 22 #include "ash/common/system/keyboard_brightness_control_delegate.h"
22 #include "ash/common/system/toast/toast_manager.h" 23 #include "ash/common/system/toast/toast_manager.h"
23 #include "ash/common/system/tray/system_tray_delegate.h" 24 #include "ash/common/system/tray/system_tray_delegate.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 accessibility_delegate_.reset(delegate_->CreateAccessibilityDelegate()); 61 accessibility_delegate_.reset(delegate_->CreateAccessibilityDelegate());
61 media_delegate_.reset(delegate_->CreateMediaDelegate()); 62 media_delegate_.reset(delegate_->CreateMediaDelegate());
62 toast_manager_.reset(new ToastManager); 63 toast_manager_.reset(new ToastManager);
63 64
64 // Create the app list item in the shelf data model. 65 // Create the app list item in the shelf data model.
65 AppListShelfItemDelegate::CreateAppListItemAndDelegate(shelf_model_.get()); 66 AppListShelfItemDelegate::CreateAppListItemAndDelegate(shelf_model_.get());
66 67
67 // Install the custom factory early on so that views::FocusManagers for Tray, 68 // Install the custom factory early on so that views::FocusManagers for Tray,
68 // Shelf, and WallPaper could be created by the factory. 69 // Shelf, and WallPaper could be created by the factory.
69 views::FocusManagerFactory::Install(new AshFocusManagerFactory); 70 views::FocusManagerFactory::Install(new AshFocusManagerFactory);
71
72 new_window_delegate_.reset(delegate_->CreateNewWindowDelegate());
70 } 73 }
71 74
72 void WmShell::Shutdown() { 75 void WmShell::Shutdown() {
73 // Accesses WmShell in its destructor. 76 // Accesses WmShell in its destructor.
74 accessibility_delegate_.reset(); 77 accessibility_delegate_.reset();
75 // ShelfItemDelegate subclasses it owns have complex cleanup to run (e.g. ARC 78 // ShelfItemDelegate subclasses it owns have complex cleanup to run (e.g. ARC
76 // shelf items in Chrome) so explicitly shutdown early. 79 // shelf items in Chrome) so explicitly shutdown early.
77 shelf_model_->DestroyItemDelegates(); 80 shelf_model_->DestroyItemDelegates();
78 // Must be destroyed before FocusClient. 81 // Must be destroyed before FocusClient.
79 shelf_delegate_.reset(); 82 shelf_delegate_.reset();
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 void WmShell::DeleteToastManager() { 255 void WmShell::DeleteToastManager() {
253 toast_manager_.reset(); 256 toast_manager_.reset();
254 } 257 }
255 258
256 void WmShell::SetAcceleratorController( 259 void WmShell::SetAcceleratorController(
257 std::unique_ptr<AcceleratorController> accelerator_controller) { 260 std::unique_ptr<AcceleratorController> accelerator_controller) {
258 accelerator_controller_ = std::move(accelerator_controller); 261 accelerator_controller_ = std::move(accelerator_controller);
259 } 262 }
260 263
261 } // namespace ash 264 } // 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