Chromium Code Reviews| Index: content/renderer/render_widget_mus_connection.h |
| diff --git a/content/renderer/render_widget_mus_connection.h b/content/renderer/render_widget_mus_connection.h |
| index d82d67e628c0296fa2dd5f667c942025533282ea..b522a9f52fc7f9cb45392366d1970ca5dc434bfc 100644 |
| --- a/content/renderer/render_widget_mus_connection.h |
| +++ b/content/renderer/render_widget_mus_connection.h |
| @@ -6,6 +6,7 @@ |
| #define CONTENT_RENDERER_RENDER_WIDGET_MUS_CONNECTION_H_ |
| #include "base/macros.h" |
| +#include "cc/output/output_surface.h" |
| #include "components/mus/public/cpp/window.h" |
| #include "components/mus/public/cpp/window_observer.h" |
| #include "components/mus/public/cpp/window_surface.h" |
| @@ -19,13 +20,20 @@ class RenderWidgetMusConnection : public mus::WindowTreeDelegate, |
| public mus::WindowObserver { |
| public: |
| RenderWidgetMusConnection( |
|
Fady Samuel
2015/11/30 23:06:55
nit: explicit
Peng
2015/12/01 15:22:47
Done.
|
| - int routing_id, |
| - mojo::InterfaceRequest<mus::mojom::WindowTreeClient> request); |
| + int routing_id); |
| ~RenderWidgetMusConnection() override; |
| - private: |
| - void SubmitCompositorFrame(); |
| + // Connect to a WindowTreeClient request. |
| + void Connect(mojo::InterfaceRequest<mus::mojom::WindowTreeClient> request); |
| + |
| + // Create a cc output surface. |
| + scoped_ptr<cc::OutputSurface> CreateOutputSurface(); |
| + // Get the connection from a routing_id, if the connection doesn't exist, |
| + // a new connection will be created. |
| + static RenderWidgetMusConnection* Get(int routing_id); |
|
Fady Samuel
2015/11/30 23:19:19
nit: I usually prefer GetOrCreate for accessors th
Peng
2015/12/01 15:22:47
Done.
|
| + |
| + private: |
| // WindowTreeDelegate implementation: |
| void OnConnectionLost(mus::WindowTreeConnection* connection) override; |
| void OnEmbed(mus::Window* root) override; |
| @@ -35,8 +43,9 @@ class RenderWidgetMusConnection : public mus::WindowTreeDelegate, |
| const gfx::Rect& new_bounds) override; |
| const int routing_id_; |
| + bool connected_; |
|
Fady Samuel
2015/11/30 23:06:55
Remove.
Peng
2015/12/01 15:22:47
Done.
|
| mus::Window* root_; |
| - scoped_ptr<mus::WindowSurface> surface_; |
| + scoped_ptr<mus::WindowSurfaceBinding> window_surface_binding_; |
| DISALLOW_COPY_AND_ASSIGN(RenderWidgetMusConnection); |
| }; |