Chromium Code Reviews| Index: chrome/browser/chrome_browser_main_extra_parts_exo.cc |
| diff --git a/chrome/browser/chrome_browser_main_extra_parts_exo.cc b/chrome/browser/chrome_browser_main_extra_parts_exo.cc |
| index f955c0a7ffe7e004b8d13ba5f91f440ae819a87d..82a1527bd43115bbd2740e3a8e9edac47a17b56a 100644 |
| --- a/chrome/browser/chrome_browser_main_extra_parts_exo.cc |
| +++ b/chrome/browser/chrome_browser_main_extra_parts_exo.cc |
| @@ -10,6 +10,8 @@ |
| #include <glib.h> |
| #endif |
| +#include "ash/public/cpp/window_properties.h" |
| +#include "ash/public/interfaces/window_pin_type.mojom.h" |
| #include "base/command_line.h" |
| #include "base/macros.h" |
| #include "base/message_loop/message_loop.h" |
| @@ -21,6 +23,8 @@ |
| #include "components/exo/wm_helper_mus.h" |
| #include "content/public/browser/browser_thread.h" |
| #include "ui/arc/notification/arc_notification_surface_manager.h" |
| +#include "ui/aura/mus/property_converter.h" |
| +#include "ui/views/mus/mus_client.h" |
| #if defined(USE_GLIB) |
| namespace { |
| @@ -117,6 +121,22 @@ ChromeBrowserMainExtraPartsExo::ChromeBrowserMainExtraPartsExo() {} |
| ChromeBrowserMainExtraPartsExo::~ChromeBrowserMainExtraPartsExo() {} |
| +void ChromeBrowserMainExtraPartsExo::ServiceManagerConnectionStarted( |
|
sky
2017/04/03 16:38:56
This property is really ash specific. I think you
Peng
2017/04/03 18:03:48
Done.
|
| + content::ServiceManagerConnection* connection) { |
| + if (ash_util::IsRunningInMash()) { |
| + // Register exo-specific window properties with Chrome's property converter. |
| + // This propagates ash properties set on exo windows to ash, via mojo. |
| + DCHECK(views::MusClient::Exists()); |
| + views::MusClient* mus_client = views::MusClient::Get(); |
| + aura::WindowTreeClientDelegate* delegate = mus_client; |
| + aura::PropertyConverter* converter = delegate->GetPropertyConverter(); |
| + |
| + converter->RegisterProperty(ash::kWindowPinTypeKey, |
| + ash::mojom::kWindowPinType_Property, |
| + base::Bind(&ash::IsValidWindowPinType)); |
| + } |
| +} |
| + |
| void ChromeBrowserMainExtraPartsExo::PreProfileInit() { |
| if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
| switches::kEnableWaylandServer)) |