| Index: mash/example/views_examples/views_examples.cc
|
| diff --git a/mash/example/views_examples/views_examples.cc b/mash/example/views_examples/views_examples.cc
|
| index e559bf998ec8ea814d369494f15a04946a3a58c5..769abd676236e97f37e63a794acbcb22199bf100 100644
|
| --- a/mash/example/views_examples/views_examples.cc
|
| +++ b/mash/example/views_examples/views_examples.cc
|
| @@ -5,6 +5,8 @@
|
| #include <memory>
|
| #include <vector>
|
|
|
| +#include "ash/public/cpp/shelf_types.h"
|
| +#include "ash/public/cpp/window_properties.h"
|
| #include "base/macros.h"
|
| #include "base/memory/ptr_util.h"
|
| #include "mash/public/interfaces/launchable.mojom.h"
|
| @@ -15,9 +17,11 @@
|
| #include "services/service_manager/public/cpp/service.h"
|
| #include "services/service_manager/public/cpp/service_context.h"
|
| #include "services/service_manager/public/cpp/service_runner.h"
|
| +#include "ui/aura/window.h"
|
| #include "ui/views/examples/example_base.h"
|
| #include "ui/views/examples/examples_window.h"
|
| #include "ui/views/mus/aura_init.h"
|
| +#include "ui/views/widget/widget.h"
|
|
|
| class ViewsExamples : public service_manager::Service,
|
| public mash::mojom::Launchable {
|
| @@ -35,6 +39,7 @@ class ViewsExamples : public service_manager::Service,
|
| context()->connector(), context()->identity(),
|
| "views_mus_resources.pak", std::string(), nullptr,
|
| views::AuraInit::Mode::AURA_MUS);
|
| + ash::RegisterWindowPropertiesForTransportAndMirroring();
|
| }
|
| void OnBindInterface(const service_manager::BindSourceInfo& source_info,
|
| const std::string& interface_name,
|
| @@ -45,7 +50,13 @@ class ViewsExamples : public service_manager::Service,
|
|
|
| // mash::mojom::Launchable:
|
| void Launch(uint32_t what, mash::mojom::LaunchMode how) override {
|
| - views::examples::ShowExamplesWindow(views::examples::QUIT_ON_CLOSE);
|
| + views::Widget* widget =
|
| + views::examples::ShowExamplesWindow(views::examples::QUIT_ON_CLOSE);
|
| + aura::Window* window = widget->GetNativeWindow();
|
| + const ash::ShelfID shelf_id("org.chromium.mash.views_examples");
|
| + window->SetProperty(ash::kShelfIDKey,
|
| + new std::string(shelf_id.Serialize()));
|
| + window->SetProperty<int>(ash::kShelfItemTypeKey, ash::TYPE_DIALOG);
|
| }
|
|
|
| void Create(const service_manager::BindSourceInfo& source_info,
|
|
|