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> |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 // Returns the render_widget_id for the RenderWidgetHost. Will return 0U if | 144 // Returns the render_widget_id for the RenderWidgetHost. Will return 0U if |
145 // the host is not found. | 145 // the host is not found. |
146 int GetRenderWidgetId(const int tab_id, | 146 int GetRenderWidgetId(const int tab_id, |
147 content::RenderWidgetHost* render_widget_host); | 147 content::RenderWidgetHost* render_widget_host); |
148 | 148 |
149 // Returns the RenderWidgetHost for the given render_widget_id. Will return | 149 // Returns the RenderWidgetHost for the given render_widget_id. Will return |
150 // nullptr if no host is found. | 150 // nullptr if no host is found. |
151 content::RenderWidgetHost* GetRenderWidgetHost(const int tab_id, | 151 content::RenderWidgetHost* GetRenderWidgetHost(const int tab_id, |
152 const int render_widget_id); | 152 const int render_widget_id); |
153 | 153 |
154 // Inserts the text entered by the user into the |client|. | 154 // Sends the text entered by the user to the renderer. |
155 // The existing text in the box gets replaced by the new text from IME. | 155 // The existing text in the box gets replaced by the new text from IME. |
156 void SetTextFromIME(ui::TextInputClient* client, std::string text); | 156 void SetTextFromIME(content::RenderWidgetHost* render_widget_host, |
| 157 std::string text, |
| 158 bool auto_submit); |
157 | 159 |
158 DelegateMap delegates_; | 160 DelegateMap delegates_; |
159 TabMap tabs_; | 161 TabMap tabs_; |
160 | 162 |
161 // A RenderWidgetHost can also be uniquely identified by the | 163 // A RenderWidgetHost can also be uniquely identified by the |
162 // <process_id, routing_id> where the process_id is the id for the | 164 // <process_id, routing_id> where the process_id is the id for the |
163 // RenderProcessHost for this widget and the routing_id is the id for the | 165 // RenderProcessHost for this widget and the routing_id is the id for the |
164 // widget. | 166 // widget. |
165 // But we generate our own ids to avoid having the render widget protocol tied | 167 // But we generate our own ids to avoid having the render widget protocol tied |
166 // to always using a combination of these ids, generated by the content layer. | 168 // to always using a combination of these ids, generated by the content layer. |
(...skipping 13 matching lines...) Expand all Loading... |
180 std::unique_ptr<BlimpMessageProcessor> input_message_sender_; | 182 std::unique_ptr<BlimpMessageProcessor> input_message_sender_; |
181 std::unique_ptr<BlimpMessageProcessor> ime_message_sender_; | 183 std::unique_ptr<BlimpMessageProcessor> ime_message_sender_; |
182 | 184 |
183 DISALLOW_COPY_AND_ASSIGN(EngineRenderWidgetFeature); | 185 DISALLOW_COPY_AND_ASSIGN(EngineRenderWidgetFeature); |
184 }; | 186 }; |
185 | 187 |
186 } // namespace engine | 188 } // namespace engine |
187 } // namespace blimp | 189 } // namespace blimp |
188 | 190 |
189 #endif // BLIMP_ENGINE_FEATURE_ENGINE_RENDER_WIDGET_FEATURE_H_ | 191 #endif // BLIMP_ENGINE_FEATURE_ENGINE_RENDER_WIDGET_FEATURE_H_ |
OLD | NEW |