| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BLIMP_CLIENT_CORE_RENDER_WIDGET_RENDER_WIDGET_FEATURE_H_ | 5 #ifndef BLIMP_CLIENT_CORE_RENDER_WIDGET_RENDER_WIDGET_FEATURE_H_ |
| 6 #define BLIMP_CLIENT_CORE_RENDER_WIDGET_RENDER_WIDGET_FEATURE_H_ | 6 #define BLIMP_CLIENT_CORE_RENDER_WIDGET_RENDER_WIDGET_FEATURE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 // messages to the engine. | 66 // messages to the engine. |
| 67 void set_outgoing_input_message_processor( | 67 void set_outgoing_input_message_processor( |
| 68 std::unique_ptr<BlimpMessageProcessor> processor); | 68 std::unique_ptr<BlimpMessageProcessor> processor); |
| 69 | 69 |
| 70 // Set the BlimpMessageProcessor that will be used to send | 70 // Set the BlimpMessageProcessor that will be used to send |
| 71 // BlimpMessage::COMPOSITOR messages to the engine. | 71 // BlimpMessage::COMPOSITOR messages to the engine. |
| 72 void set_outgoing_compositor_message_processor( | 72 void set_outgoing_compositor_message_processor( |
| 73 std::unique_ptr<BlimpMessageProcessor> processor); | 73 std::unique_ptr<BlimpMessageProcessor> processor); |
| 74 | 74 |
| 75 // Sends a WebGestureEvent for |tab_id| to the engine. | 75 // Sends a WebGestureEvent for |tab_id| to the engine. |
| 76 void SendWebGestureEvent(const int tab_id, | 76 // virtual for testing. |
| 77 const int render_widget_id, | 77 virtual void SendWebGestureEvent(const int tab_id, |
| 78 const blink::WebGestureEvent& event); | 78 const int render_widget_id, |
| 79 const blink::WebGestureEvent& event); |
| 79 | 80 |
| 80 // Sends a CompositorMessage for |tab_id| to the engine. | 81 // Sends a CompositorMessage for |tab_id| to the engine. |
| 81 void SendCompositorMessage(const int tab_id, | 82 // virtual for testing. |
| 82 const int render_widget_id, | 83 virtual void SendCompositorMessage( |
| 83 const cc::proto::CompositorMessage& message); | 84 const int tab_id, |
| 85 const int render_widget_id, |
| 86 const cc::proto::CompositorMessage& message); |
| 84 | 87 |
| 85 // Sets a RenderWidgetMessageDelegate to be notified of all incoming | 88 // Sets a RenderWidgetMessageDelegate to be notified of all incoming |
| 86 // RenderWidget related messages for |tab_id| from the engine. There can only | 89 // RenderWidget related messages for |tab_id| from the engine. There can only |
| 87 // be one RenderWidgetMessageDelegate per tab. | 90 // be one RenderWidgetMessageDelegate per tab. |
| 88 // virtual for testing. | 91 // virtual for testing. |
| 89 virtual void SetDelegate(int tab_id, RenderWidgetFeatureDelegate* delegate); | 92 virtual void SetDelegate(int tab_id, RenderWidgetFeatureDelegate* delegate); |
| 90 virtual void RemoveDelegate(const int tab_id); | 93 virtual void RemoveDelegate(const int tab_id); |
| 91 | 94 |
| 92 // BlimpMessageProcessor implementation. | 95 // BlimpMessageProcessor implementation. |
| 93 void ProcessMessage(std::unique_ptr<BlimpMessage> message, | 96 void ProcessMessage(std::unique_ptr<BlimpMessage> message, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 116 // Used to send BlimpMessage::COMPOSITOR messages to the engine. | 119 // Used to send BlimpMessage::COMPOSITOR messages to the engine. |
| 117 std::unique_ptr<BlimpMessageProcessor> outgoing_compositor_message_processor_; | 120 std::unique_ptr<BlimpMessageProcessor> outgoing_compositor_message_processor_; |
| 118 | 121 |
| 119 DISALLOW_COPY_AND_ASSIGN(RenderWidgetFeature); | 122 DISALLOW_COPY_AND_ASSIGN(RenderWidgetFeature); |
| 120 }; | 123 }; |
| 121 | 124 |
| 122 } // namespace client | 125 } // namespace client |
| 123 } // namespace blimp | 126 } // namespace blimp |
| 124 | 127 |
| 125 #endif // BLIMP_CLIENT_CORE_RENDER_WIDGET_RENDER_WIDGET_FEATURE_H_ | 128 #endif // BLIMP_CLIENT_CORE_RENDER_WIDGET_RENDER_WIDGET_FEATURE_H_ |
| OLD | NEW |