OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_RENDERER_RENDER_WIDGET_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_ |
6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ | 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 friend class content::RenderWidgetTest; | 178 friend class content::RenderWidgetTest; |
179 | 179 |
180 enum ResizeAck { | 180 enum ResizeAck { |
181 SEND_RESIZE_ACK, | 181 SEND_RESIZE_ACK, |
182 NO_RESIZE_ACK, | 182 NO_RESIZE_ACK, |
183 }; | 183 }; |
184 | 184 |
185 RenderWidget(WebKit::WebPopupType popup_type, | 185 RenderWidget(WebKit::WebPopupType popup_type, |
186 const WebKit::WebScreenInfo& screen_info, | 186 const WebKit::WebScreenInfo& screen_info, |
187 bool swapped_out); | 187 bool swapped_out); |
| 188 |
188 virtual ~RenderWidget(); | 189 virtual ~RenderWidget(); |
189 | 190 |
190 // Initializes this view with the given opener. CompleteInit must be called | 191 // Initializes this view with the given opener. CompleteInit must be called |
191 // later. | 192 // later. |
192 void Init(int32 opener_id); | 193 void Init(int32 opener_id); |
193 | 194 |
194 // Called by Init and subclasses to perform initialization. | 195 // Called by Init and subclasses to perform initialization. |
195 void DoInit(int32 opener_id, | 196 void DoInit(int32 opener_id, |
196 WebKit::WebWidget* web_widget, | 197 WebKit::WebWidget* web_widget, |
197 IPC::SyncMessage* create_widget_message); | 198 IPC::SyncMessage* create_widget_message); |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 | 321 |
321 void WillToggleFullscreen(); | 322 void WillToggleFullscreen(); |
322 void DidToggleFullscreen(); | 323 void DidToggleFullscreen(); |
323 | 324 |
324 bool next_paint_is_resize_ack() const; | 325 bool next_paint_is_resize_ack() const; |
325 bool next_paint_is_restore_ack() const; | 326 bool next_paint_is_restore_ack() const; |
326 void set_next_paint_is_resize_ack(); | 327 void set_next_paint_is_resize_ack(); |
327 void set_next_paint_is_restore_ack(); | 328 void set_next_paint_is_restore_ack(); |
328 void set_next_paint_is_repaint_ack(); | 329 void set_next_paint_is_repaint_ack(); |
329 | 330 |
| 331 void set_throttle_input_events(bool throttle_input_events) { |
| 332 throttle_input_events_ = throttle_input_events; |
| 333 } |
| 334 |
330 // Checks if the text input state and compose inline mode have been changed. | 335 // Checks if the text input state and compose inline mode have been changed. |
331 // If they are changed, the new value will be sent to the browser process. | 336 // If they are changed, the new value will be sent to the browser process. |
332 void UpdateTextInputState(); | 337 void UpdateTextInputState(); |
333 | 338 |
334 // Checks if the selection bounds have been changed. If they are changed, | 339 // Checks if the selection bounds have been changed. If they are changed, |
335 // the new value will be sent to the browser process. | 340 // the new value will be sent to the browser process. |
336 virtual void UpdateSelectionBounds(); | 341 virtual void UpdateSelectionBounds(); |
337 | 342 |
338 // Checks if the composition range or composition character bounds have been | 343 // Checks if the composition range or composition character bounds have been |
339 // changed. If they are changed, the new value will be sent to the browser | 344 // changed. If they are changed, the new value will be sent to the browser |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 // case NULL is added to the queue. | 568 // case NULL is added to the queue. |
564 std::deque<ViewHostMsg_UpdateRect*> updates_pending_swap_; | 569 std::deque<ViewHostMsg_UpdateRect*> updates_pending_swap_; |
565 | 570 |
566 // Properties of the screen hosting this RenderWidget instance. | 571 // Properties of the screen hosting this RenderWidget instance. |
567 WebKit::WebScreenInfo screen_info_; | 572 WebKit::WebScreenInfo screen_info_; |
568 | 573 |
569 // The device scale factor. This value is computed from the DPI entries in | 574 // The device scale factor. This value is computed from the DPI entries in |
570 // |screen_info_| on some platforms, and defaults to 1 on other platforms. | 575 // |screen_info_| on some platforms, and defaults to 1 on other platforms. |
571 float device_scale_factor_; | 576 float device_scale_factor_; |
572 | 577 |
| 578 // Specifies whether input event throttling is enabled for this widget. |
| 579 bool throttle_input_events_; |
| 580 |
573 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 581 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
574 }; | 582 }; |
575 | 583 |
576 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 584 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
OLD | NEW |