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

Unified Diff: content/renderer/render_widget_mus_connection.h

Issue 1484013003: mustash: Implement basic input event routing in renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: The right diff Created 5 years 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
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 b522a9f52fc7f9cb45392366d1970ca5dc434bfc..b3aaaf0e4273c6f7307b1e94550cb26b8e926806 100644
--- a/content/renderer/render_widget_mus_connection.h
+++ b/content/renderer/render_widget_mus_connection.h
@@ -7,45 +7,40 @@
#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"
-#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:
- RenderWidgetMusConnection(
- int routing_id);
- ~RenderWidgetMusConnection() override;
+class InputHandlerManager;
- // Connect to a WindowTreeClient request.
- void Connect(mojo::InterfaceRequest<mus::mojom::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* Get(int routing_id);
+ 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 int routing_id_;
- bool connected_;
- mus::Window* root_;
scoped_ptr<mus::WindowSurfaceBinding> window_surface_binding_;
+ scoped_refptr<CompositorMusConnection> compositor_mus_connection_;
DISALLOW_COPY_AND_ASSIGN(RenderWidgetMusConnection);
};

Powered by Google App Engine
This is Rietveld 408576698