| Index: mash/catalog_viewer/catalog_viewer.cc
|
| diff --git a/mash/catalog_viewer/catalog_viewer.cc b/mash/catalog_viewer/catalog_viewer.cc
|
| index 75abf03a15032293ca67ccc37c2dc5b644b2c6a2..92f7c6470b14c13356a57663f08950a089b23095 100644
|
| --- a/mash/catalog_viewer/catalog_viewer.cc
|
| +++ b/mash/catalog_viewer/catalog_viewer.cc
|
| @@ -7,6 +7,8 @@
|
| #include <stddef.h>
|
| #include <stdint.h>
|
|
|
| +#include "ash/public/cpp/shelf_types.h"
|
| +#include "ash/public/cpp/window_properties.h"
|
| #include "base/bind.h"
|
| #include "base/macros.h"
|
| #include "base/memory/ptr_util.h"
|
| @@ -18,6 +20,7 @@
|
| #include "services/catalog/public/interfaces/constants.mojom.h"
|
| #include "services/service_manager/public/cpp/connector.h"
|
| #include "services/service_manager/public/cpp/service_context.h"
|
| +#include "ui/aura/window.h"
|
| #include "ui/base/models/table_model.h"
|
| #include "ui/base/resource/resource_bundle.h"
|
| #include "ui/resources/grit/ui_resources.h"
|
| @@ -225,6 +228,7 @@ void CatalogViewer::OnStart() {
|
| aura_init_ = base::MakeUnique<views::AuraInit>(
|
| context()->connector(), context()->identity(), "views_mus_resources.pak",
|
| std::string(), nullptr, views::AuraInit::Mode::AURA_MUS);
|
| + ash::RegisterWindowPropertiesForTransportAndMirroring();
|
| }
|
|
|
| void CatalogViewer::OnBindInterface(
|
| @@ -245,11 +249,16 @@ void CatalogViewer::Launch(uint32_t what, mojom::LaunchMode how) {
|
| catalog::mojom::CatalogPtr catalog;
|
| context()->connector()->BindInterface(catalog::mojom::kServiceName, &catalog);
|
|
|
| - views::Widget* window = views::Widget::CreateWindowWithContextAndBounds(
|
| + views::Widget* widget = views::Widget::CreateWindowWithContextAndBounds(
|
| new CatalogViewerContents(this, std::move(catalog)), nullptr,
|
| gfx::Rect(25, 25, 500, 600));
|
| - window->Show();
|
| - windows_.push_back(window);
|
| + aura::Window* window = widget->GetNativeWindow();
|
| + const ash::ShelfID shelf_id("org.chromium.mash.catalog_viewer");
|
| + window->SetProperty(ash::kShelfIDKey, new std::string(shelf_id.Serialize()));
|
| + window->SetProperty<int>(ash::kShelfItemTypeKey, ash::TYPE_DIALOG);
|
| +
|
| + widget->Show();
|
| + windows_.push_back(widget);
|
| }
|
|
|
| void CatalogViewer::Create(const service_manager::BindSourceInfo& source_info,
|
|
|