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

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

Issue 2721153004: Remove ash_util namespace (Closed)
Patch Set: Created 3 years, 9 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
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_properties.h" 8 #include "ash/public/cpp/window_properties.h"
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 20 matching lines...) Expand all
31 #include "ui/keyboard/content/keyboard.h" 31 #include "ui/keyboard/content/keyboard.h"
32 #include "ui/keyboard/keyboard_controller.h" 32 #include "ui/keyboard/keyboard_controller.h"
33 #include "ui/views/mus/mus_client.h" 33 #include "ui/views/mus/mus_client.h"
34 34
35 ChromeBrowserMainExtraPartsAsh::ChromeBrowserMainExtraPartsAsh() {} 35 ChromeBrowserMainExtraPartsAsh::ChromeBrowserMainExtraPartsAsh() {}
36 36
37 ChromeBrowserMainExtraPartsAsh::~ChromeBrowserMainExtraPartsAsh() {} 37 ChromeBrowserMainExtraPartsAsh::~ChromeBrowserMainExtraPartsAsh() {}
38 38
39 void ChromeBrowserMainExtraPartsAsh::ServiceManagerConnectionStarted( 39 void ChromeBrowserMainExtraPartsAsh::ServiceManagerConnectionStarted(
40 content::ServiceManagerConnection* connection) { 40 content::ServiceManagerConnection* connection) {
41 if (ash_util::IsRunningInMash()) { 41 if (IsRunningInMash()) {
42 // Register ash-specific window properties with Chrome's property converter. 42 // Register ash-specific window properties with Chrome's property converter.
43 // This propagates ash properties set on chrome windows to ash, via mojo. 43 // This propagates ash properties set on chrome windows to ash, via mojo.
44 DCHECK(views::MusClient::Exists()); 44 DCHECK(views::MusClient::Exists());
45 views::MusClient* mus_client = views::MusClient::Get(); 45 views::MusClient* mus_client = views::MusClient::Get();
46 aura::WindowTreeClientDelegate* delegate = mus_client; 46 aura::WindowTreeClientDelegate* delegate = mus_client;
47 aura::PropertyConverter* converter = delegate->GetPropertyConverter(); 47 aura::PropertyConverter* converter = delegate->GetPropertyConverter();
48 48
49 converter->RegisterProperty( 49 converter->RegisterProperty(
50 ash::kPanelAttachedKey, 50 ash::kPanelAttachedKey,
51 ui::mojom::WindowManager::kPanelAttached_Property, 51 ui::mojom::WindowManager::kPanelAttached_Property,
52 aura::PropertyConverter::CreateAcceptAnyValueCallback()); 52 aura::PropertyConverter::CreateAcceptAnyValueCallback());
53 converter->RegisterProperty( 53 converter->RegisterProperty(
54 ash::kShelfItemTypeKey, 54 ash::kShelfItemTypeKey,
55 ui::mojom::WindowManager::kShelfItemType_Property, 55 ui::mojom::WindowManager::kShelfItemType_Property,
56 base::Bind(&ash::IsValidShelfItemType)); 56 base::Bind(&ash::IsValidShelfItemType));
57 57
58 mus_client->SetMusPropertyMirror( 58 mus_client->SetMusPropertyMirror(
59 base::MakeUnique<ash::MusPropertyMirrorAsh>()); 59 base::MakeUnique<ash::MusPropertyMirrorAsh>());
60 } 60 }
61 } 61 }
62 62
63 void ChromeBrowserMainExtraPartsAsh::PreProfileInit() { 63 void ChromeBrowserMainExtraPartsAsh::PreProfileInit() {
64 if (ash_util::ShouldOpenAshOnStartup()) 64 if (ShouldOpenAshOnStartup())
65 chrome::OpenAsh(gfx::kNullAcceleratedWidget); 65 chrome::OpenAsh(gfx::kNullAcceleratedWidget);
66 66
67 if (ash_util::IsRunningInMash()) { 67 if (IsRunningInMash()) {
68 immersive_context_ = base::MakeUnique<ImmersiveContextMus>(); 68 immersive_context_ = base::MakeUnique<ImmersiveContextMus>();
69 immersive_handler_factory_ = base::MakeUnique<ImmersiveHandlerFactoryMus>(); 69 immersive_handler_factory_ = base::MakeUnique<ImmersiveHandlerFactoryMus>();
70 } 70 }
71 71
72 session_controller_client_ = base::MakeUnique<SessionControllerClient>(); 72 session_controller_client_ = base::MakeUnique<SessionControllerClient>();
73 73
74 // Must be available at login screen, so initialize before profile. 74 // Must be available at login screen, so initialize before profile.
75 system_tray_client_ = base::MakeUnique<SystemTrayClient>(); 75 system_tray_client_ = base::MakeUnique<SystemTrayClient>();
76 new_window_client_ = base::MakeUnique<ChromeNewWindowClient>(); 76 new_window_client_ = base::MakeUnique<ChromeNewWindowClient>();
77 volume_controller_ = base::MakeUnique<VolumeController>(); 77 volume_controller_ = base::MakeUnique<VolumeController>();
78 vpn_list_forwarder_ = base::MakeUnique<VpnListForwarder>(); 78 vpn_list_forwarder_ = base::MakeUnique<VpnListForwarder>();
79 79
80 // For OS_CHROMEOS, virtual keyboard needs to be initialized before profile 80 // For OS_CHROMEOS, virtual keyboard needs to be initialized before profile
81 // initialized. Otherwise, virtual keyboard extension will not load at login 81 // initialized. Otherwise, virtual keyboard extension will not load at login
82 // screen. 82 // screen.
83 keyboard::InitializeKeyboard(); 83 keyboard::InitializeKeyboard();
84 84
85 ui::SelectFileDialog::SetFactory(new SelectFileDialogExtensionFactory); 85 ui::SelectFileDialog::SetFactory(new SelectFileDialogExtensionFactory);
86 } 86 }
87 87
88 void ChromeBrowserMainExtraPartsAsh::PostProfileInit() { 88 void ChromeBrowserMainExtraPartsAsh::PostProfileInit() {
89 if (ash_util::IsRunningInMash()) { 89 if (IsRunningInMash()) {
90 DCHECK(!ash::Shell::HasInstance()); 90 DCHECK(!ash::Shell::HasInstance());
91 DCHECK(!ChromeLauncherController::instance()); 91 DCHECK(!ChromeLauncherController::instance());
92 chrome_launcher_controller_mus_ = 92 chrome_launcher_controller_mus_ =
93 base::MakeUnique<ChromeLauncherControllerMus>(); 93 base::MakeUnique<ChromeLauncherControllerMus>();
94 chrome_launcher_controller_mus_->Init(); 94 chrome_launcher_controller_mus_->Init();
95 chrome_shell_content_state_ = base::MakeUnique<ChromeShellContentState>(); 95 chrome_shell_content_state_ = base::MakeUnique<ChromeShellContentState>();
96 } 96 }
97 97
98 cast_config_client_media_router_ = 98 cast_config_client_media_router_ =
99 base::MakeUnique<CastConfigClientMediaRouter>(); 99 base::MakeUnique<CastConfigClientMediaRouter>();
(...skipping 14 matching lines...) Expand all
114 vpn_list_forwarder_.reset(); 114 vpn_list_forwarder_.reset();
115 volume_controller_.reset(); 115 volume_controller_.reset();
116 new_window_client_.reset(); 116 new_window_client_.reset();
117 system_tray_client_.reset(); 117 system_tray_client_.reset();
118 media_client_.reset(); 118 media_client_.reset();
119 cast_config_client_media_router_.reset(); 119 cast_config_client_media_router_.reset();
120 session_controller_client_.reset(); 120 session_controller_client_.reset();
121 121
122 chrome::CloseAsh(); 122 chrome::CloseAsh();
123 } 123 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698