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

Side by Side Diff: chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc

Issue 2835063003: mash: Use ChromeLauncherControllerImpl, remove Mus subclass stub. (Closed)
Patch Set: Add comment and separate mash-only members. Created 3 years, 8 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 | « chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h" 5 #include "chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h"
6 6
7 #include "ash/public/cpp/mus_property_mirror_ash.h" 7 #include "ash/public/cpp/mus_property_mirror_ash.h"
8 #include "ash/public/cpp/window_pin_type.h" 8 #include "ash/public/cpp/window_pin_type.h"
9 #include "ash/public/cpp/window_properties.h" 9 #include "ash/public/cpp/window_properties.h"
10 #include "ash/public/interfaces/window_pin_type.mojom.h" 10 #include "ash/public/interfaces/window_pin_type.mojom.h"
11 #include "ash/root_window_controller.h" 11 #include "ash/root_window_controller.h"
12 #include "ash/shelf/shelf_model.h"
12 #include "ash/shell.h" 13 #include "ash/shell.h"
13 #include "base/memory/ptr_util.h" 14 #include "base/memory/ptr_util.h"
14 #include "chrome/browser/chrome_browser_main.h" 15 #include "chrome/browser/chrome_browser_main.h"
15 #include "chrome/browser/ui/ash/ash_init.h" 16 #include "chrome/browser/ui/ash/ash_init.h"
16 #include "chrome/browser/ui/ash/ash_util.h" 17 #include "chrome/browser/ui/ash/ash_util.h"
17 #include "chrome/browser/ui/ash/cast_config_client_media_router.h" 18 #include "chrome/browser/ui/ash/cast_config_client_media_router.h"
18 #include "chrome/browser/ui/ash/chrome_new_window_client.h" 19 #include "chrome/browser/ui/ash/chrome_new_window_client.h"
19 #include "chrome/browser/ui/ash/chrome_shell_content_state.h" 20 #include "chrome/browser/ui/ash/chrome_shell_content_state.h"
20 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.h" 21 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h"
21 #include "chrome/browser/ui/ash/media_client.h" 22 #include "chrome/browser/ui/ash/media_client.h"
22 #include "chrome/browser/ui/ash/session_controller_client.h" 23 #include "chrome/browser/ui/ash/session_controller_client.h"
23 #include "chrome/browser/ui/ash/system_tray_client.h" 24 #include "chrome/browser/ui/ash/system_tray_client.h"
24 #include "chrome/browser/ui/ash/volume_controller.h" 25 #include "chrome/browser/ui/ash/volume_controller.h"
25 #include "chrome/browser/ui/ash/vpn_list_forwarder.h" 26 #include "chrome/browser/ui/ash/vpn_list_forwarder.h"
26 #include "chrome/browser/ui/views/ash/tab_scrubber.h" 27 #include "chrome/browser/ui/views/ash/tab_scrubber.h"
27 #include "chrome/browser/ui/views/frame/immersive_context_mus.h" 28 #include "chrome/browser/ui/views/frame/immersive_context_mus.h"
28 #include "chrome/browser/ui/views/frame/immersive_handler_factory_mus.h" 29 #include "chrome/browser/ui/views/frame/immersive_handler_factory_mus.h"
29 #include "chrome/browser/ui/views/select_file_dialog_extension.h" 30 #include "chrome/browser/ui/views/select_file_dialog_extension.h"
30 #include "chrome/browser/ui/views/select_file_dialog_extension_factory.h" 31 #include "chrome/browser/ui/views/select_file_dialog_extension_factory.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // screen. 88 // screen.
88 keyboard::InitializeKeyboard(); 89 keyboard::InitializeKeyboard();
89 90
90 ui::SelectFileDialog::SetFactory(new SelectFileDialogExtensionFactory); 91 ui::SelectFileDialog::SetFactory(new SelectFileDialogExtensionFactory);
91 } 92 }
92 93
93 void ChromeBrowserMainExtraPartsAsh::PostProfileInit() { 94 void ChromeBrowserMainExtraPartsAsh::PostProfileInit() {
94 if (ash_util::IsRunningInMash()) { 95 if (ash_util::IsRunningInMash()) {
95 DCHECK(!ash::Shell::HasInstance()); 96 DCHECK(!ash::Shell::HasInstance());
96 DCHECK(!ChromeLauncherController::instance()); 97 DCHECK(!ChromeLauncherController::instance());
97 chrome_launcher_controller_mus_ = 98 // TODO(crbug.com/557406): Synchronize this ShelfModel with the one in Ash.
98 base::MakeUnique<ChromeLauncherControllerMus>(); 99 chrome_shelf_model_ = base::MakeUnique<ash::ShelfModel>();
99 chrome_launcher_controller_mus_->Init(); 100 chrome_launcher_controller_ =
101 base::MakeUnique<ChromeLauncherControllerImpl>(
102 nullptr, chrome_shelf_model_.get());
103 chrome_launcher_controller_->Init();
100 chrome_shell_content_state_ = base::MakeUnique<ChromeShellContentState>(); 104 chrome_shell_content_state_ = base::MakeUnique<ChromeShellContentState>();
101 } 105 }
102 106
103 cast_config_client_media_router_ = 107 cast_config_client_media_router_ =
104 base::MakeUnique<CastConfigClientMediaRouter>(); 108 base::MakeUnique<CastConfigClientMediaRouter>();
105 media_client_ = base::MakeUnique<MediaClient>(); 109 media_client_ = base::MakeUnique<MediaClient>();
106 110
107 if (!ash::Shell::HasInstance()) 111 if (!ash::Shell::HasInstance())
108 return; 112 return;
109 113
110 // Initialize TabScrubber after the Ash Shell has been initialized. 114 // Initialize TabScrubber after the Ash Shell has been initialized.
111 TabScrubber::GetInstance(); 115 TabScrubber::GetInstance();
112 // Activate virtual keyboard after profile is initialized. It depends on the 116 // Activate virtual keyboard after profile is initialized. It depends on the
113 // default profile. 117 // default profile.
114 ash::Shell::GetPrimaryRootWindowController()->ActivateKeyboard( 118 ash::Shell::GetPrimaryRootWindowController()->ActivateKeyboard(
115 keyboard::KeyboardController::GetInstance()); 119 keyboard::KeyboardController::GetInstance());
116 } 120 }
117 121
118 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() { 122 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() {
123 chrome_launcher_controller_.reset();
124 chrome_shelf_model_.reset();
119 vpn_list_forwarder_.reset(); 125 vpn_list_forwarder_.reset();
120 volume_controller_.reset(); 126 volume_controller_.reset();
121 new_window_client_.reset(); 127 new_window_client_.reset();
122 system_tray_client_.reset(); 128 system_tray_client_.reset();
123 media_client_.reset(); 129 media_client_.reset();
124 cast_config_client_media_router_.reset(); 130 cast_config_client_media_router_.reset();
125 session_controller_client_.reset(); 131 session_controller_client_.reset();
126 132
127 ash_init_.reset(); 133 ash_init_.reset();
128 } 134 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698