| 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 b3f45494b34b5b4e43c035ff54f1f68fad9fb4e3..316fbbc875fe46e4af7d30e83c9a1be010ec04e1 100644
|
| --- a/content/renderer/render_widget_mus_connection.h
|
| +++ b/content/renderer/render_widget_mus_connection.h
|
| @@ -6,44 +6,46 @@
|
| #define CONTENT_RENDERER_RENDER_WIDGET_MUS_CONNECTION_H_
|
|
|
| #include "base/macros.h"
|
| +#include "base/threading/thread_checker.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"
|
| -#include "components/mus/public/cpp/window_tree_connection.h"
|
| -#include "components/mus/public/cpp/window_tree_delegate.h"
|
| -#include "mojo/public/cpp/bindings/binding.h"
|
| +#include "content/renderer/compositor_mus_connection.h"
|
|
|
| namespace content {
|
|
|
| -class RenderWidgetMusConnection : public mus::WindowTreeDelegate,
|
| - public mus::WindowObserver {
|
| - public:
|
| - explicit RenderWidgetMusConnection(int routing_id);
|
| - ~RenderWidgetMusConnection() override;
|
| +class InputHandlerManager;
|
|
|
| - // Connect to a WindowTreeClient request.
|
| +// Use on main thread.
|
| +class RenderWidgetMusConnection {
|
| + public:
|
| + // Bind to a WindowTreeClient request.
|
| void Bind(mojo::InterfaceRequest<mus::mojom::WindowTreeClient> request);
|
|
|
| // Create a cc output surface.
|
| scoped_ptr<cc::OutputSurface> CreateOutputSurface();
|
|
|
| + static RenderWidgetMusConnection* Get(int routing_id);
|
| +
|
| // Get the connection from a routing_id, if the connection doesn't exist,
|
| // a new connection will be created.
|
| static RenderWidgetMusConnection* GetOrCreate(int routing_id);
|
|
|
| private:
|
| - // WindowTreeDelegate implementation:
|
| - void OnConnectionLost(mus::WindowTreeConnection* connection) override;
|
| - void OnEmbed(mus::Window* root) override;
|
| - void OnUnembed() override;
|
| - void OnWindowBoundsChanged(mus::Window* window,
|
| - const gfx::Rect& old_bounds,
|
| - const gfx::Rect& new_bounds) override;
|
| + friend class CompositorMusConnection;
|
| +
|
| + explicit RenderWidgetMusConnection(int routing_id);
|
| + ~RenderWidgetMusConnection();
|
| +
|
| + void OnConnectionLost();
|
| + void OnWindowInputEvent(scoped_ptr<blink::WebInputEvent> input_event,
|
| + const base::Closure& ack);
|
|
|
| const int routing_id_;
|
| - mus::Window* root_;
|
| scoped_ptr<mus::WindowSurfaceBinding> window_surface_binding_;
|
| + scoped_refptr<CompositorMusConnection> compositor_mus_connection_;
|
| +
|
| + // Used to verify single threaded access.
|
| + base::ThreadChecker thread_checker_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(RenderWidgetMusConnection);
|
| };
|
|
|