| Index: services/ui/public/cpp/window.h
|
| diff --git a/services/ui/public/cpp/window.h b/services/ui/public/cpp/window.h
|
| index 9db06aa0b3a50a4b4b485981d7b717d2b6ae5cf3..58d2c800855ba9333f8ec4ff3c1994eca2f9b214 100644
|
| --- a/services/ui/public/cpp/window.h
|
| +++ b/services/ui/public/cpp/window.h
|
| @@ -11,6 +11,7 @@
|
| #include "base/callback.h"
|
| #include "base/macros.h"
|
| #include "base/observer_list.h"
|
| +#include "base/timer/timer.h"
|
| #include "mojo/public/cpp/bindings/array.h"
|
| #include "services/shell/public/interfaces/interface_provider.mojom.h"
|
| #include "services/ui/common/types.h"
|
| @@ -67,6 +68,8 @@ class Window {
|
|
|
| WindowTreeClient* window_tree() { return client_; }
|
|
|
| + void SetIsContainer();
|
| +
|
| // The local_id is provided for client code. The local_id is not set or
|
| // manipulated by mus. The default value is -1.
|
| void set_local_id(int id) { local_id_ = id; }
|
| @@ -264,7 +267,7 @@ class Window {
|
|
|
| protected:
|
| // This class is subclassed only by test classes that provide a public ctor.
|
| - Window();
|
| + Window(bool container = false);
|
| ~Window();
|
|
|
| private:
|
| @@ -272,7 +275,10 @@ class Window {
|
| friend class WindowTreeClient;
|
| friend class WindowTreeClientPrivate;
|
|
|
| - Window(WindowTreeClient* client, Id id);
|
| + Window(WindowTreeClient* client, Id id, bool container = false);
|
| +
|
| + void WantToDraw();
|
| + void Draw();
|
|
|
| // Used to identify this Window on the server. Clients can not change this
|
| // value.
|
| @@ -300,6 +306,10 @@ class Window {
|
| // Returns true if the order actually changed.
|
| bool LocalReorder(Window* relative, mojom::OrderDirection direction);
|
| void LocalSetBounds(const gfx::Rect& old_bounds, const gfx::Rect& new_bounds);
|
| + void LocalSetSurfaceId(const gfx::Size& size,
|
| + float device_scale_factor,
|
| + const cc::SurfaceId& surface_id,
|
| + const cc::SurfaceSequence& surface_sequence);
|
| void LocalSetClientArea(
|
| const gfx::Insets& new_client_area,
|
| const std::vector<gfx::Rect>& additional_client_areas);
|
| @@ -343,6 +353,7 @@ class Window {
|
| static Window** GetStackingTarget(Window* window);
|
|
|
| WindowTreeClient* client_;
|
| + bool container_ = false;
|
| Id server_id_;
|
| int local_id_ = -1;
|
| Window* parent_;
|
| @@ -393,6 +404,19 @@ class Window {
|
|
|
| std::map<const void*, Value> prop_map_;
|
|
|
| + base::Timer draw_timer_;
|
| +
|
| + struct SurfaceInfo {
|
| + gfx::Size size;
|
| + float device_scale_factor;
|
| + cc::SurfaceId surface_id;
|
| + cc::SurfaceSequence surface_sequence;
|
| + };
|
| + SurfaceInfo surface_info_;
|
| + std::unique_ptr<WindowSurface> container_surface_;
|
| +
|
| + base::WeakPtrFactory<Window> weak_factory_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(Window);
|
| };
|
|
|
|
|