| 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_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 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 void ChromeBrowserMainExtraPartsAsh::ServiceManagerConnectionStarted( | 39 void ChromeBrowserMainExtraPartsAsh::ServiceManagerConnectionStarted( |
| 40 content::ServiceManagerConnection* connection) { | 40 content::ServiceManagerConnection* connection) { |
| 41 if (chrome::IsRunningInMash()) { | 41 if (chrome::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 converter->RegisterProperty( | 49 converter->RegisterProperty( |
| 49 ash::kPanelAttachedKey, | 50 ash::kPanelAttachedKey, |
| 50 ui::mojom::WindowManager::kPanelAttached_Property); | 51 ui::mojom::WindowManager::kPanelAttached_Property, |
| 52 aura::PropertyConverter::CreateAcceptAnyValueCallback()); |
| 51 converter->RegisterProperty( | 53 converter->RegisterProperty( |
| 52 ash::kShelfItemTypeKey, | 54 ash::kShelfItemTypeKey, |
| 53 ui::mojom::WindowManager::kShelfItemType_Property); | 55 ui::mojom::WindowManager::kShelfItemType_Property, |
| 56 base::Bind(&ash::IsValidShelfItemType)); |
| 54 | 57 |
| 55 mus_client->SetMusPropertyMirror( | 58 mus_client->SetMusPropertyMirror( |
| 56 base::MakeUnique<ash::MusPropertyMirrorAsh>()); | 59 base::MakeUnique<ash::MusPropertyMirrorAsh>()); |
| 57 } | 60 } |
| 58 } | 61 } |
| 59 | 62 |
| 60 void ChromeBrowserMainExtraPartsAsh::PreProfileInit() { | 63 void ChromeBrowserMainExtraPartsAsh::PreProfileInit() { |
| 61 if (chrome::ShouldOpenAshOnStartup()) | 64 if (chrome::ShouldOpenAshOnStartup()) |
| 62 chrome::OpenAsh(gfx::kNullAcceleratedWidget); | 65 chrome::OpenAsh(gfx::kNullAcceleratedWidget); |
| 63 | 66 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 vpn_list_forwarder_.reset(); | 114 vpn_list_forwarder_.reset(); |
| 112 volume_controller_.reset(); | 115 volume_controller_.reset(); |
| 113 new_window_client_.reset(); | 116 new_window_client_.reset(); |
| 114 system_tray_client_.reset(); | 117 system_tray_client_.reset(); |
| 115 media_client_.reset(); | 118 media_client_.reset(); |
| 116 cast_config_client_media_router_.reset(); | 119 cast_config_client_media_router_.reset(); |
| 117 session_controller_client_.reset(); | 120 session_controller_client_.reset(); |
| 118 | 121 |
| 119 chrome::CloseAsh(); | 122 chrome::CloseAsh(); |
| 120 } | 123 } |
| OLD | NEW |