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

Unified Diff: chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc

Issue 2915223002: mash: Fix mash app shelf items; encapsulate ash property setup. (Closed)
Patch Set: Similar changes for other mash apps. Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc
diff --git a/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc b/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc
index aab4bb8588fd54a98d1a620d393182338bc268c9..314a25aaddd94557f2b4313d521d8a6439aaf3cf 100644
--- a/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc
+++ b/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc
@@ -4,10 +4,7 @@
#include "chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h"
-#include "ash/public/cpp/mus_property_mirror_ash.h"
-#include "ash/public/cpp/window_pin_type.h"
#include "ash/public/cpp/window_properties.h"
-#include "ash/public/interfaces/window_pin_type.mojom.h"
#include "ash/root_window_controller.h"
#include "ash/shelf/shelf_model.h"
#include "ash/shell.h"
@@ -30,11 +27,8 @@
#include "chrome/browser/ui/views/frame/immersive_handler_factory_mus.h"
#include "chrome/browser/ui/views/select_file_dialog_extension.h"
#include "chrome/browser/ui/views/select_file_dialog_extension_factory.h"
-#include "ui/aura/mus/property_converter.h"
-#include "ui/base/class_property.h"
#include "ui/keyboard/content/keyboard.h"
#include "ui/keyboard/keyboard_controller.h"
-#include "ui/views/mus/mus_client.h"
ChromeBrowserMainExtraPartsAsh::ChromeBrowserMainExtraPartsAsh() {}
@@ -46,29 +40,7 @@ void ChromeBrowserMainExtraPartsAsh::ServiceManagerConnectionStarted(
// ash::Shell will not be created because ash is running out-of-process.
ash::Shell::SetIsBrowserProcessWithMash();
- // Register ash-specific window properties with Chrome's property converter.
- // This propagates ash properties set on chrome 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->RegisterPrimitiveProperty(
- ash::kPanelAttachedKey,
- ui::mojom::WindowManager::kPanelAttached_Property,
- aura::PropertyConverter::CreateAcceptAnyValueCallback());
- converter->RegisterPrimitiveProperty(
- ash::kShelfItemTypeKey,
- ui::mojom::WindowManager::kShelfItemType_Property,
- base::Bind(&ash::IsValidShelfItemType));
- converter->RegisterPrimitiveProperty(
- ash::kWindowPinTypeKey, ash::mojom::kWindowPinType_Property,
- base::Bind(&ash::IsValidWindowPinType));
- converter->RegisterStringProperty(
- ash::kShelfIDKey, ui::mojom::WindowManager::kShelfID_Property);
sky 2017/06/02 13:36:39 Ideally clients would not have to do anything spec
msw 2017/06/02 15:25:15 We would need some way to (a) disambiguate windows
-
- mus_client->SetMusPropertyMirror(
- base::MakeUnique<ash::MusPropertyMirrorAsh>());
+ ash::RegisterWindowPropertiesForTransportAndMirroring();
}
}

Powered by Google App Engine
This is Rietveld 408576698