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_chromeos.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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 chrome_shelf_model_ = base::MakeUnique<ash::ShelfModel>(); | 101 chrome_shelf_model_ = base::MakeUnique<ash::ShelfModel>(); |
101 chrome_launcher_controller_ = base::MakeUnique<ChromeLauncherController>( | 102 chrome_launcher_controller_ = base::MakeUnique<ChromeLauncherController>( |
102 nullptr, chrome_shelf_model_.get()); | 103 nullptr, chrome_shelf_model_.get()); |
103 chrome_launcher_controller_->Init(); | 104 chrome_launcher_controller_->Init(); |
104 chrome_shell_content_state_ = base::MakeUnique<ChromeShellContentState>(); | 105 chrome_shell_content_state_ = base::MakeUnique<ChromeShellContentState>(); |
105 } | 106 } |
106 | 107 |
107 cast_config_client_media_router_ = | 108 cast_config_client_media_router_ = |
108 base::MakeUnique<CastConfigClientMediaRouter>(); | 109 base::MakeUnique<CastConfigClientMediaRouter>(); |
109 media_client_ = base::MakeUnique<MediaClient>(); | 110 media_client_ = base::MakeUnique<MediaClient>(); |
| 111 lock_screen_client_ = base::MakeUnique<LockScreenClientChromeOS>(); |
110 | 112 |
111 if (!ash::Shell::HasInstance()) | 113 if (!ash::Shell::HasInstance()) |
112 return; | 114 return; |
113 | 115 |
114 // Initialize TabScrubber after the Ash Shell has been initialized. | 116 // Initialize TabScrubber after the Ash Shell has been initialized. |
115 TabScrubber::GetInstance(); | 117 TabScrubber::GetInstance(); |
116 // Activate virtual keyboard after profile is initialized. It depends on the | 118 // Activate virtual keyboard after profile is initialized. It depends on the |
117 // default profile. | 119 // default profile. |
118 ash::Shell::GetPrimaryRootWindowController()->ActivateKeyboard( | 120 ash::Shell::GetPrimaryRootWindowController()->ActivateKeyboard( |
119 keyboard::KeyboardController::GetInstance()); | 121 keyboard::KeyboardController::GetInstance()); |
120 } | 122 } |
121 | 123 |
122 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() { | 124 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() { |
123 chrome_launcher_controller_.reset(); | 125 chrome_launcher_controller_.reset(); |
124 chrome_shelf_model_.reset(); | 126 chrome_shelf_model_.reset(); |
125 vpn_list_forwarder_.reset(); | 127 vpn_list_forwarder_.reset(); |
126 volume_controller_.reset(); | 128 volume_controller_.reset(); |
127 new_window_client_.reset(); | 129 new_window_client_.reset(); |
128 system_tray_client_.reset(); | 130 system_tray_client_.reset(); |
129 media_client_.reset(); | 131 media_client_.reset(); |
130 cast_config_client_media_router_.reset(); | 132 cast_config_client_media_router_.reset(); |
131 session_controller_client_.reset(); | 133 session_controller_client_.reset(); |
| 134 lock_screen_client_.reset(); |
132 | 135 |
133 ash_init_.reset(); | 136 ash_init_.reset(); |
134 } | 137 } |
OLD | NEW |