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 "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/shelf/shelf_model.h" |
13 #include "ash/shell.h" | 13 #include "ash/shell.h" |
14 #include "base/memory/ptr_util.h" | 14 #include "base/memory/ptr_util.h" |
15 #include "chrome/browser/chrome_browser_main.h" | 15 #include "chrome/browser/chrome_browser_main.h" |
16 #include "chrome/browser/ui/ash/ash_init.h" | 16 #include "chrome/browser/ui/ash/ash_init.h" |
17 #include "chrome/browser/ui/ash/ash_util.h" | 17 #include "chrome/browser/ui/ash/ash_util.h" |
18 #include "chrome/browser/ui/ash/cast_config_client_media_router.h" | 18 #include "chrome/browser/ui/ash/cast_config_client_media_router.h" |
19 #include "chrome/browser/ui/ash/chrome_new_window_client.h" | 19 #include "chrome/browser/ui/ash/chrome_new_window_client.h" |
20 #include "chrome/browser/ui/ash/chrome_shell_content_state.h" | 20 #include "chrome/browser/ui/ash/chrome_shell_content_state.h" |
21 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" | 21 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
| 22 #include "chrome/browser/ui/ash/lock_screen_client.h" |
22 #include "chrome/browser/ui/ash/media_client.h" | 23 #include "chrome/browser/ui/ash/media_client.h" |
23 #include "chrome/browser/ui/ash/session_controller_client.h" | 24 #include "chrome/browser/ui/ash/session_controller_client.h" |
24 #include "chrome/browser/ui/ash/system_tray_client.h" | 25 #include "chrome/browser/ui/ash/system_tray_client.h" |
25 #include "chrome/browser/ui/ash/volume_controller.h" | 26 #include "chrome/browser/ui/ash/volume_controller.h" |
26 #include "chrome/browser/ui/ash/vpn_list_forwarder.h" | 27 #include "chrome/browser/ui/ash/vpn_list_forwarder.h" |
27 #include "chrome/browser/ui/views/ash/tab_scrubber.h" | 28 #include "chrome/browser/ui/views/ash/tab_scrubber.h" |
28 #include "chrome/browser/ui/views/frame/immersive_context_mus.h" | 29 #include "chrome/browser/ui/views/frame/immersive_context_mus.h" |
29 #include "chrome/browser/ui/views/frame/immersive_handler_factory_mus.h" | 30 #include "chrome/browser/ui/views/frame/immersive_handler_factory_mus.h" |
30 #include "chrome/browser/ui/views/select_file_dialog_extension.h" | 31 #include "chrome/browser/ui/views/select_file_dialog_extension.h" |
31 #include "chrome/browser/ui/views/select_file_dialog_extension_factory.h" | 32 #include "chrome/browser/ui/views/select_file_dialog_extension_factory.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 chrome_shelf_model_ = base::MakeUnique<ash::ShelfModel>(); | 106 chrome_shelf_model_ = base::MakeUnique<ash::ShelfModel>(); |
106 chrome_launcher_controller_ = base::MakeUnique<ChromeLauncherController>( | 107 chrome_launcher_controller_ = base::MakeUnique<ChromeLauncherController>( |
107 nullptr, chrome_shelf_model_.get()); | 108 nullptr, chrome_shelf_model_.get()); |
108 chrome_launcher_controller_->Init(); | 109 chrome_launcher_controller_->Init(); |
109 chrome_shell_content_state_ = base::MakeUnique<ChromeShellContentState>(); | 110 chrome_shell_content_state_ = base::MakeUnique<ChromeShellContentState>(); |
110 } | 111 } |
111 | 112 |
112 cast_config_client_media_router_ = | 113 cast_config_client_media_router_ = |
113 base::MakeUnique<CastConfigClientMediaRouter>(); | 114 base::MakeUnique<CastConfigClientMediaRouter>(); |
114 media_client_ = base::MakeUnique<MediaClient>(); | 115 media_client_ = base::MakeUnique<MediaClient>(); |
| 116 lock_screen_client_ = base::MakeUnique<LockScreenClient>(); |
115 | 117 |
116 if (!ash::Shell::HasInstance()) | 118 if (!ash::Shell::HasInstance()) |
117 return; | 119 return; |
118 | 120 |
119 // Initialize TabScrubber after the Ash Shell has been initialized. | 121 // Initialize TabScrubber after the Ash Shell has been initialized. |
120 TabScrubber::GetInstance(); | 122 TabScrubber::GetInstance(); |
121 // Activate virtual keyboard after profile is initialized. It depends on the | 123 // Activate virtual keyboard after profile is initialized. It depends on the |
122 // default profile. | 124 // default profile. |
123 ash::Shell::GetPrimaryRootWindowController()->ActivateKeyboard( | 125 ash::Shell::GetPrimaryRootWindowController()->ActivateKeyboard( |
124 keyboard::KeyboardController::GetInstance()); | 126 keyboard::KeyboardController::GetInstance()); |
125 } | 127 } |
126 | 128 |
127 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() { | 129 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() { |
128 chrome_launcher_controller_.reset(); | 130 chrome_launcher_controller_.reset(); |
129 chrome_shelf_model_.reset(); | 131 chrome_shelf_model_.reset(); |
130 vpn_list_forwarder_.reset(); | 132 vpn_list_forwarder_.reset(); |
131 volume_controller_.reset(); | 133 volume_controller_.reset(); |
132 new_window_client_.reset(); | 134 new_window_client_.reset(); |
133 system_tray_client_.reset(); | 135 system_tray_client_.reset(); |
| 136 lock_screen_client_.reset(); |
134 media_client_.reset(); | 137 media_client_.reset(); |
135 cast_config_client_media_router_.reset(); | 138 cast_config_client_media_router_.reset(); |
136 session_controller_client_.reset(); | 139 session_controller_client_.reset(); |
137 | 140 |
138 ash_init_.reset(); | 141 ash_init_.reset(); |
139 } | 142 } |
OLD | NEW |