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

Unified Diff: components/mus/demo/mus_demo.h

Issue 2072343002: Changes how window manager obtains WindowTree from mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: include Created 4 years, 6 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
« no previous file with comments | « components/mus/demo/manifest.json ('k') | components/mus/demo/mus_demo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/demo/mus_demo.h
diff --git a/components/mus/demo/mus_demo.h b/components/mus/demo/mus_demo.h
index 28c9de2e8736818ef6b1dd9b19b498986ded6be2..dbb62647294e2606b0ce671fcf4c050a5fc32f22 100644
--- a/components/mus/demo/mus_demo.h
+++ b/components/mus/demo/mus_demo.h
@@ -13,12 +13,8 @@
#include "base/callback.h"
#include "base/macros.h"
#include "base/timer/timer.h"
-#include "components/mus/public/cpp/window.h"
#include "components/mus/public/cpp/window_manager_delegate.h"
#include "components/mus/public/cpp/window_tree_client_delegate.h"
-#include "components/mus/public/interfaces/window_manager_factory.mojom.h"
-#include "mojo/public/cpp/bindings/binding_set.h"
-#include "services/shell/public/cpp/connector.h"
#include "services/shell/public/cpp/shell_client.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -32,7 +28,6 @@ namespace mus_demo {
// window and draws a spinning square in the center of the window. Provides a
// simple way to demonstrate that the graphic stack works as intended.
class MusDemo : public shell::ShellClient,
- public mus::mojom::WindowManagerFactory,
public mus::WindowTreeClientDelegate,
public mus::WindowManagerDelegate {
public:
@@ -48,15 +43,9 @@ class MusDemo : public shell::ShellClient,
// WindowTreeClientDelegate:
void OnEmbed(mus::Window* root) override;
- void OnUnembed(mus::Window* root) override;
void OnWindowTreeClientDestroyed(mus::WindowTreeClient* client) override;
void OnEventObserved(const ui::Event& event, mus::Window* target) override;
- // mus::mojom::WindowManagerFactory:
- void CreateWindowManager(
- mus::mojom::DisplayPtr display,
- mus::mojom::WindowTreeClientRequest request) override;
-
// WindowManagerDelegate:
void SetWindowManagerClient(mus::WindowManagerClient* client) override;
bool OnWmSetBounds(mus::Window* window, gfx::Rect* bounds) override;
@@ -68,6 +57,8 @@ class MusDemo : public shell::ShellClient,
std::map<std::string, std::vector<uint8_t>>* properties) override;
void OnWmClientJankinessChanged(const std::set<mus::Window*>& client_windows,
bool janky) override;
+ void OnWmNewDisplay(mus::Window* window,
+ const display::Display& display) override;
void OnAccelerator(uint32_t id, const ui::Event& event) override;
// Allocate a bitmap the same size as the window to draw into.
@@ -79,9 +70,7 @@ class MusDemo : public shell::ShellClient,
shell::Connector* connector_ = nullptr;
mus::Window* window_ = nullptr;
- mus::WindowManagerClient* window_manager_client_ = nullptr;
- mojo::Binding<mus::mojom::WindowManagerFactory>
- window_manager_factory_binding_;
+ mus::WindowTreeClient* window_tree_client_ = nullptr;
// Used to send frames to mus.
std::unique_ptr<bitmap_uploader::BitmapUploader> uploader_;
« no previous file with comments | « components/mus/demo/manifest.json ('k') | components/mus/demo/mus_demo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698