| 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_ENGINE_FEATURE_ENGINE_RENDER_WIDGET_FEATURE_H_ | 5 #ifndef BLIMP_ENGINE_FEATURE_ENGINE_RENDER_WIDGET_FEATURE_H_ |
| 6 #define BLIMP_ENGINE_FEATURE_ENGINE_RENDER_WIDGET_FEATURE_H_ | 6 #define BLIMP_ENGINE_FEATURE_ENGINE_RENDER_WIDGET_FEATURE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/atomic_sequence_num.h" | 14 #include "base/atomic_sequence_num.h" |
| 15 #include "base/containers/small_map.h" | 15 #include "base/containers/small_map.h" |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "blimp/engine/app/settings_manager.h" | 17 #include "blimp/engine/app/settings_manager.h" |
| 18 #include "blimp/net/blimp_message_processor.h" | 18 #include "blimp/net/blimp_message_processor.h" |
| 19 #include "blimp/net/input_message_converter.h" | 19 #include "blimp/net/input_message_converter.h" |
| 20 #include "ui/base/ime/text_input_client.h" | 20 #include "ui/base/ime/text_input_client.h" |
| 21 | 21 |
| 22 namespace blink { | 22 namespace blink { |
| 23 class WebGestureEvent; | 23 class WebGestureEvent; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace content { | 26 namespace content { |
| 27 class RenderWidgetHost; | 27 class RenderWidgetHost; |
| 28 struct FormFieldData; | |
| 29 } | 28 } |
| 30 | 29 |
| 31 namespace blimp { | 30 namespace blimp { |
| 32 namespace engine { | 31 namespace engine { |
| 33 | 32 |
| 34 // Handles all incoming and outgoing protobuf message types tied to a specific | 33 // Handles all incoming and outgoing protobuf message types tied to a specific |
| 35 // RenderWidget. This includes BlimpMessage::INPUT, BlimpMessage::COMPOSITOR, | 34 // RenderWidget. This includes BlimpMessage::INPUT, BlimpMessage::COMPOSITOR, |
| 36 // and BlimpMessage::RENDER_WIDGET messages. Delegates can be added to be | 35 // and BlimpMessage::RENDER_WIDGET messages. Delegates can be added to be |
| 37 // notified of incoming messages. This class automatically handles dropping | 36 // notified of incoming messages. This class automatically handles dropping |
| 38 // stale BlimpMessage::RENDER_WIDGET messages from the client after a | 37 // stale BlimpMessage::RENDER_WIDGET messages from the client after a |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 // Only one RenderWidget can be in initialized state for a tab. | 86 // Only one RenderWidget can be in initialized state for a tab. |
| 88 void OnRenderWidgetInitialized(const int tab_id, | 87 void OnRenderWidgetInitialized(const int tab_id, |
| 89 content::RenderWidgetHost* render_widget_host); | 88 content::RenderWidgetHost* render_widget_host); |
| 90 | 89 |
| 91 void OnRenderWidgetDeleted(const int tab_id, | 90 void OnRenderWidgetDeleted(const int tab_id, |
| 92 content::RenderWidgetHost* render_widget_host); | 91 content::RenderWidgetHost* render_widget_host); |
| 93 | 92 |
| 94 // Notifies the client to show/hide IME. | 93 // Notifies the client to show/hide IME. |
| 95 void SendShowImeRequest(const int tab_id, | 94 void SendShowImeRequest(const int tab_id, |
| 96 content::RenderWidgetHost* render_widget_host, | 95 content::RenderWidgetHost* render_widget_host, |
| 97 const content::FormFieldData& field); | 96 const ui::TextInputClient* client); |
| 98 void SendHideImeRequest(const int tab_id, | 97 void SendHideImeRequest(const int tab_id, |
| 99 content::RenderWidgetHost* render_widget_host); | 98 content::RenderWidgetHost* render_widget_host); |
| 100 | 99 |
| 101 // Sends a CompositorMessage for |tab_id| to the client. | 100 // Sends a CompositorMessage for |tab_id| to the client. |
| 102 void SendCompositorMessage(const int tab_id, | 101 void SendCompositorMessage(const int tab_id, |
| 103 content::RenderWidgetHost* render_widget_host, | 102 content::RenderWidgetHost* render_widget_host, |
| 104 const std::vector<uint8_t>& message); | 103 const std::vector<uint8_t>& message); |
| 105 | 104 |
| 106 // Sets a RenderWidgetMessageDelegate to be notified of all incoming | 105 // Sets a RenderWidgetMessageDelegate to be notified of all incoming |
| 107 // RenderWidget related messages for |tab_id| from the client. There can only | 106 // RenderWidget related messages for |tab_id| from the client. There can only |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 | 184 |
| 186 base::WeakPtrFactory<EngineRenderWidgetFeature> weak_factory_; | 185 base::WeakPtrFactory<EngineRenderWidgetFeature> weak_factory_; |
| 187 | 186 |
| 188 DISALLOW_COPY_AND_ASSIGN(EngineRenderWidgetFeature); | 187 DISALLOW_COPY_AND_ASSIGN(EngineRenderWidgetFeature); |
| 189 }; | 188 }; |
| 190 | 189 |
| 191 } // namespace engine | 190 } // namespace engine |
| 192 } // namespace blimp | 191 } // namespace blimp |
| 193 | 192 |
| 194 #endif // BLIMP_ENGINE_FEATURE_ENGINE_RENDER_WIDGET_FEATURE_H_ | 193 #endif // BLIMP_ENGINE_FEATURE_ENGINE_RENDER_WIDGET_FEATURE_H_ |
| OLD | NEW |