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" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 void ChromeBrowserMainExtraPartsAsh::ServiceManagerConnectionStarted( | 42 void ChromeBrowserMainExtraPartsAsh::ServiceManagerConnectionStarted( |
43 content::ServiceManagerConnection* connection) { | 43 content::ServiceManagerConnection* connection) { |
44 if (ash_util::IsRunningInMash()) { | 44 if (ash_util::IsRunningInMash()) { |
45 // Register ash-specific window properties with Chrome's property converter. | 45 // Register ash-specific window properties with Chrome's property converter. |
46 // This propagates ash properties set on chrome windows to ash, via mojo. | 46 // This propagates ash properties set on chrome windows to ash, via mojo. |
47 DCHECK(views::MusClient::Exists()); | 47 DCHECK(views::MusClient::Exists()); |
48 views::MusClient* mus_client = views::MusClient::Get(); | 48 views::MusClient* mus_client = views::MusClient::Get(); |
49 aura::WindowTreeClientDelegate* delegate = mus_client; | 49 aura::WindowTreeClientDelegate* delegate = mus_client; |
50 aura::PropertyConverter* converter = delegate->GetPropertyConverter(); | 50 aura::PropertyConverter* converter = delegate->GetPropertyConverter(); |
51 | 51 |
52 converter->RegisterProperty( | 52 converter->RegisterPrimitiveProperty( |
53 ash::kPanelAttachedKey, | 53 ash::kPanelAttachedKey, |
54 ui::mojom::WindowManager::kPanelAttached_Property, | 54 ui::mojom::WindowManager::kPanelAttached_Property, |
55 aura::PropertyConverter::CreateAcceptAnyValueCallback()); | 55 aura::PropertyConverter::CreateAcceptAnyValueCallback()); |
56 converter->RegisterProperty(ash::kShelfIDKey, | 56 converter->RegisterPrimitiveProperty( |
57 ui::mojom::WindowManager::kShelfID_Property); | |
58 converter->RegisterProperty( | |
59 ash::kShelfItemTypeKey, | 57 ash::kShelfItemTypeKey, |
60 ui::mojom::WindowManager::kShelfItemType_Property, | 58 ui::mojom::WindowManager::kShelfItemType_Property, |
61 base::Bind(&ash::IsValidShelfItemType)); | 59 base::Bind(&ash::IsValidShelfItemType)); |
62 converter->RegisterProperty(ash::kWindowPinTypeKey, | 60 converter->RegisterPrimitiveProperty( |
63 ash::mojom::kWindowPinType_Property, | 61 ash::kWindowPinTypeKey, ash::mojom::kWindowPinType_Property, |
64 base::Bind(&ash::IsValidWindowPinType)); | 62 base::Bind(&ash::IsValidWindowPinType)); |
| 63 converter->RegisterStringProperty( |
| 64 ash::kShelfIDKey, ui::mojom::WindowManager::kShelfID_Property); |
65 | 65 |
66 mus_client->SetMusPropertyMirror( | 66 mus_client->SetMusPropertyMirror( |
67 base::MakeUnique<ash::MusPropertyMirrorAsh>()); | 67 base::MakeUnique<ash::MusPropertyMirrorAsh>()); |
68 } | 68 } |
69 } | 69 } |
70 | 70 |
71 void ChromeBrowserMainExtraPartsAsh::PreProfileInit() { | 71 void ChromeBrowserMainExtraPartsAsh::PreProfileInit() { |
72 if (ash_util::ShouldOpenAshOnStartup()) | 72 if (ash_util::ShouldOpenAshOnStartup()) |
73 ash_init_ = base::MakeUnique<AshInit>(); | 73 ash_init_ = base::MakeUnique<AshInit>(); |
74 | 74 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 vpn_list_forwarder_.reset(); | 127 vpn_list_forwarder_.reset(); |
128 volume_controller_.reset(); | 128 volume_controller_.reset(); |
129 new_window_client_.reset(); | 129 new_window_client_.reset(); |
130 system_tray_client_.reset(); | 130 system_tray_client_.reset(); |
131 media_client_.reset(); | 131 media_client_.reset(); |
132 cast_config_client_media_router_.reset(); | 132 cast_config_client_media_router_.reset(); |
133 session_controller_client_.reset(); | 133 session_controller_client_.reset(); |
134 | 134 |
135 ash_init_.reset(); | 135 ash_init_.reset(); |
136 } | 136 } |
OLD | NEW |