| 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_FEATURE_RENDER_WIDGET_FEATURE_H_ | 5 #ifndef BLIMP_CLIENT_FEATURE_RENDER_WIDGET_FEATURE_H_ | 
| 6 #define BLIMP_CLIENT_FEATURE_RENDER_WIDGET_FEATURE_H_ | 6 #define BLIMP_CLIENT_FEATURE_RENDER_WIDGET_FEATURE_H_ | 
| 7 | 7 | 
| 8 #include <stdint.h> | 8 #include <stdint.h> | 
| 9 | 9 | 
| 10 #include <map> | 10 #include <map> | 
| (...skipping 24 matching lines...) Expand all  Loading... | 
| 35 // RenderWidget. This includes BlimpMessage::INPUT, BlimpMessage::COMPOSITOR, | 35 // RenderWidget. This includes BlimpMessage::INPUT, BlimpMessage::COMPOSITOR, | 
| 36 // and BlimpMessage::RENDER_WIDGET messages.  Delegates can be added to be | 36 // and BlimpMessage::RENDER_WIDGET messages.  Delegates can be added to be | 
| 37 // notified of incoming messages. This class automatically attaches a specific | 37 // notified of incoming messages. This class automatically attaches a specific | 
| 38 // id so that the engine can drop stale RenderWidget related messages after it | 38 // id so that the engine can drop stale RenderWidget related messages after it | 
| 39 // sends a RenderWidgetMessage::INITIALIZE message. | 39 // sends a RenderWidgetMessage::INITIALIZE message. | 
| 40 class RenderWidgetFeature : public BlimpMessageProcessor { | 40 class RenderWidgetFeature : public BlimpMessageProcessor { | 
| 41  public: | 41  public: | 
| 42   // A delegate to be notified of specific RenderWidget related incoming events. | 42   // A delegate to be notified of specific RenderWidget related incoming events. | 
| 43   class RenderWidgetFeatureDelegate { | 43   class RenderWidgetFeatureDelegate { | 
| 44    public: | 44    public: | 
|  | 45     virtual ~RenderWidgetFeatureDelegate() {} | 
| 45     virtual void OnRenderWidgetCreated(int render_widget_id) = 0; | 46     virtual void OnRenderWidgetCreated(int render_widget_id) = 0; | 
| 46 | 47 | 
| 47     // Called when the engine's RenderWidget has changed for a particular | 48     // Called when the engine's RenderWidget has changed for a particular | 
| 48     // WebContents.  When this is received all state related to the existing | 49     // WebContents.  When this is received all state related to the existing | 
| 49     // client RenderWidget should be reset. | 50     // client RenderWidget should be reset. | 
| 50     virtual void OnRenderWidgetInitialized(int render_widget_id) = 0; | 51     virtual void OnRenderWidgetInitialized(int render_widget_id) = 0; | 
| 51 | 52 | 
| 52     virtual void OnRenderWidgetDeleted(int render_widget_id) = 0; | 53     virtual void OnRenderWidgetDeleted(int render_widget_id) = 0; | 
| 53 | 54 | 
| 54     // Called when the engine sent a CompositorMessage.  These messages should | 55     // Called when the engine sent a CompositorMessage.  These messages should | 
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 116   // Used to send BlimpMessage::COMPOSITOR messages to the engine. | 117   // Used to send BlimpMessage::COMPOSITOR messages to the engine. | 
| 117   std::unique_ptr<BlimpMessageProcessor> outgoing_compositor_message_processor_; | 118   std::unique_ptr<BlimpMessageProcessor> outgoing_compositor_message_processor_; | 
| 118 | 119 | 
| 119   DISALLOW_COPY_AND_ASSIGN(RenderWidgetFeature); | 120   DISALLOW_COPY_AND_ASSIGN(RenderWidgetFeature); | 
| 120 }; | 121 }; | 
| 121 | 122 | 
| 122 }  // namespace client | 123 }  // namespace client | 
| 123 }  // namespace blimp | 124 }  // namespace blimp | 
| 124 | 125 | 
| 125 #endif  // BLIMP_CLIENT_FEATURE_RENDER_WIDGET_FEATURE_H_ | 126 #endif  // BLIMP_CLIENT_FEATURE_RENDER_WIDGET_FEATURE_H_ | 
| OLD | NEW | 
|---|