| 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/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "chrome/browser/chrome_browser_main.h" | 10 #include "chrome/browser/chrome_browser_main.h" |
| 11 #include "chrome/browser/ui/ash/ash_init.h" | 11 #include "chrome/browser/ui/ash/ash_init.h" |
| 12 #include "chrome/browser/ui/ash/ash_util.h" | 12 #include "chrome/browser/ui/ash/ash_util.h" |
| 13 #include "chrome/browser/ui/ash/cast_config_client_media_router.h" | 13 #include "chrome/browser/ui/ash/cast_config_client_media_router.h" |
| 14 #include "chrome/browser/ui/ash/chrome_new_window_client.h" | 14 #include "chrome/browser/ui/ash/chrome_new_window_client.h" |
| 15 #include "chrome/browser/ui/ash/chrome_shell_content_state.h" | 15 #include "chrome/browser/ui/ash/chrome_shell_content_state.h" |
| 16 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.h" | 16 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.h" |
| 17 #include "chrome/browser/ui/ash/media_client.h" | 17 #include "chrome/browser/ui/ash/media_client.h" |
| 18 #include "chrome/browser/ui/ash/session_controller_client.h" | 18 #include "chrome/browser/ui/ash/session_controller_client.h" |
| 19 #include "chrome/browser/ui/ash/system_tray_client.h" | 19 #include "chrome/browser/ui/ash/system_tray_client.h" |
| 20 #include "chrome/browser/ui/ash/volume_controller.h" | 20 #include "chrome/browser/ui/ash/volume_controller.h" |
| 21 #include "chrome/browser/ui/ash/vpn_list_forwarder.h" | 21 #include "chrome/browser/ui/ash/vpn_list_forwarder.h" |
| 22 #include "chrome/browser/ui/views/ash/tab_scrubber.h" | 22 #include "chrome/browser/ui/views/ash/tab_scrubber.h" |
| 23 #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h" | |
| 24 #include "chrome/browser/ui/views/frame/immersive_context_mus.h" | 23 #include "chrome/browser/ui/views/frame/immersive_context_mus.h" |
| 25 #include "chrome/browser/ui/views/frame/immersive_handler_factory_mus.h" | 24 #include "chrome/browser/ui/views/frame/immersive_handler_factory_mus.h" |
| 26 #include "chrome/browser/ui/views/select_file_dialog_extension.h" | 25 #include "chrome/browser/ui/views/select_file_dialog_extension.h" |
| 27 #include "chrome/browser/ui/views/select_file_dialog_extension_factory.h" | 26 #include "chrome/browser/ui/views/select_file_dialog_extension_factory.h" |
| 28 #include "ui/keyboard/content/keyboard.h" | 27 #include "ui/keyboard/content/keyboard.h" |
| 29 #include "ui/keyboard/keyboard_controller.h" | 28 #include "ui/keyboard/keyboard_controller.h" |
| 30 #include "ui/wm/core/capture_controller.h" | |
| 31 #include "ui/wm/core/wm_state.h" | |
| 32 | 29 |
| 33 ChromeBrowserMainExtraPartsAsh::ChromeBrowserMainExtraPartsAsh( | 30 ChromeBrowserMainExtraPartsAsh::ChromeBrowserMainExtraPartsAsh() {} |
| 34 ChromeBrowserMainExtraPartsViews* extra_parts_views) | |
| 35 : extra_parts_views_(extra_parts_views) {} | |
| 36 | 31 |
| 37 ChromeBrowserMainExtraPartsAsh::~ChromeBrowserMainExtraPartsAsh() {} | 32 ChromeBrowserMainExtraPartsAsh::~ChromeBrowserMainExtraPartsAsh() {} |
| 38 | 33 |
| 39 void ChromeBrowserMainExtraPartsAsh::PreProfileInit() { | 34 void ChromeBrowserMainExtraPartsAsh::PreProfileInit() { |
| 40 if (chrome::ShouldOpenAshOnStartup()) | 35 if (chrome::ShouldOpenAshOnStartup()) |
| 41 chrome::OpenAsh(gfx::kNullAcceleratedWidget); | 36 chrome::OpenAsh(gfx::kNullAcceleratedWidget); |
| 42 | 37 |
| 43 if (chrome::IsRunningInMash()) { | 38 if (chrome::IsRunningInMash()) { |
| 44 immersive_context_ = base::MakeUnique<ImmersiveContextMus>( | 39 immersive_context_ = base::MakeUnique<ImmersiveContextMus>(); |
| 45 extra_parts_views_->wm_state()->capture_controller()); | |
| 46 immersive_handler_factory_ = base::MakeUnique<ImmersiveHandlerFactoryMus>(); | 40 immersive_handler_factory_ = base::MakeUnique<ImmersiveHandlerFactoryMus>(); |
| 47 } | 41 } |
| 48 | 42 |
| 49 session_controller_client_ = base::MakeUnique<SessionControllerClient>(); | 43 session_controller_client_ = base::MakeUnique<SessionControllerClient>(); |
| 50 | 44 |
| 51 // Must be available at login screen, so initialize before profile. | 45 // Must be available at login screen, so initialize before profile. |
| 52 system_tray_client_ = base::MakeUnique<SystemTrayClient>(); | 46 system_tray_client_ = base::MakeUnique<SystemTrayClient>(); |
| 53 new_window_client_ = base::MakeUnique<ChromeNewWindowClient>(); | 47 new_window_client_ = base::MakeUnique<ChromeNewWindowClient>(); |
| 54 volume_controller_ = base::MakeUnique<VolumeController>(); | 48 volume_controller_ = base::MakeUnique<VolumeController>(); |
| 55 vpn_list_forwarder_ = base::MakeUnique<VpnListForwarder>(); | 49 vpn_list_forwarder_ = base::MakeUnique<VpnListForwarder>(); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 vpn_list_forwarder_.reset(); | 85 vpn_list_forwarder_.reset(); |
| 92 volume_controller_.reset(); | 86 volume_controller_.reset(); |
| 93 new_window_client_.reset(); | 87 new_window_client_.reset(); |
| 94 system_tray_client_.reset(); | 88 system_tray_client_.reset(); |
| 95 media_client_.reset(); | 89 media_client_.reset(); |
| 96 cast_config_client_media_router_.reset(); | 90 cast_config_client_media_router_.reset(); |
| 97 session_controller_client_.reset(); | 91 session_controller_client_.reset(); |
| 98 | 92 |
| 99 chrome::CloseAsh(); | 93 chrome::CloseAsh(); |
| 100 } | 94 } |
| OLD | NEW |