| Index: blimp/client/compositor/blimp_compositor.h
|
| diff --git a/blimp/client/compositor/blimp_compositor.h b/blimp/client/compositor/blimp_compositor.h
|
| index e382a3eed9c9cf4351bf8b71356c083bfe0f1162..b95d46ae5c959489daade264428a2a2f25f5e075 100644
|
| --- a/blimp/client/compositor/blimp_compositor.h
|
| +++ b/blimp/client/compositor/blimp_compositor.h
|
| @@ -12,6 +12,7 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "blimp/client/blimp_client_export.h"
|
| #include "blimp/client/compositor/render_widget_message_processor.h"
|
| +#include "blimp/client/input/blimp_input_manager.h"
|
| #include "cc/layers/layer_settings.h"
|
| #include "cc/trees/layer_tree_host_client.h"
|
| #include "cc/trees/layer_tree_settings.h"
|
| @@ -42,8 +43,8 @@ class BlimpMessage;
|
| class BLIMP_CLIENT_EXPORT BlimpCompositor
|
| : public cc::LayerTreeHostClient,
|
| public cc::RemoteProtoChannel,
|
| - public RenderWidgetMessageProcessor::RenderWidgetMessageDelegate {
|
| -
|
| + public RenderWidgetMessageProcessor::RenderWidgetMessageDelegate,
|
| + public BlimpInputManagerClient {
|
| public:
|
| ~BlimpCompositor() override;
|
|
|
| @@ -73,6 +74,9 @@ class BLIMP_CLIENT_EXPORT BlimpCompositor
|
| // compositor.
|
| void ReleaseAcceleratedWidget();
|
|
|
| + // Forwards the touch event to the |input_manager_|.
|
| + bool OnTouchEvent(const ui::MotionEvent& motion_event);
|
| +
|
| protected:
|
| // |dp_to_px| is the scale factor required to move from dp (device pixels) to
|
| // px. See https://developer.android.com/guide/practices/screens_support.html
|
| @@ -117,6 +121,9 @@ class BLIMP_CLIENT_EXPORT BlimpCompositor
|
| void OnCompositorMessageReceived(
|
| scoped_ptr<cc::proto::CompositorMessage> message) override;
|
|
|
| + // BlimpInputManagerClient implementation.
|
| + void SendWebInputEvent(const blink::WebInputEvent& input_event) override;
|
| +
|
| // Helper method to build the internal CC compositor instance from |message|.
|
| void CreateLayerTreeHost(scoped_ptr<cc::proto::CompositorMessage> message);
|
|
|
| @@ -158,6 +165,13 @@ class BLIMP_CLIENT_EXPORT BlimpCompositor
|
| // multiple tabs.
|
| RenderWidgetMessageProcessor render_widget_processor_;
|
|
|
| + // Handles input events for the current render widget. The lifetime of the
|
| + // input manager is tied to the lifetime of the |host_| which owns the
|
| + // cc::InputHandler. The input events are forwarded to this input handler by
|
| + // the manager to be handled by the client compositor for the current render
|
| + // widget.
|
| + scoped_ptr<BlimpInputManager> input_manager_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(BlimpCompositor);
|
| };
|
|
|
|
|