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 <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 bool scroll_far, | 178 bool scroll_far, |
179 const SmoothScrollCompletionCallback& callback); | 179 const SmoothScrollCompletionCallback& callback); |
180 | 180 |
181 // Close the underlying WebWidget. | 181 // Close the underlying WebWidget. |
182 virtual void Close(); | 182 virtual void Close(); |
183 | 183 |
184 float filtered_time_per_frame() const { | 184 float filtered_time_per_frame() const { |
185 return filtered_time_per_frame_; | 185 return filtered_time_per_frame_; |
186 } | 186 } |
187 | 187 |
| 188 enum ShowIme { |
| 189 DO_NOT_SHOW_IME, |
| 190 SHOW_IME_IF_NEEDED |
| 191 }; |
| 192 |
188 protected: | 193 protected: |
189 // Friend RefCounted so that the dtor can be non-public. Using this class | 194 // Friend RefCounted so that the dtor can be non-public. Using this class |
190 // without ref-counting is an error. | 195 // without ref-counting is an error. |
191 friend class base::RefCounted<RenderWidget>; | 196 friend class base::RefCounted<RenderWidget>; |
192 // For unit tests. | 197 // For unit tests. |
193 friend class content::RenderWidgetTest; | 198 friend class content::RenderWidgetTest; |
194 | 199 |
195 enum ResizeAck { | 200 enum ResizeAck { |
196 SEND_RESIZE_ACK, | 201 SEND_RESIZE_ACK, |
197 NO_RESIZE_ACK, | 202 NO_RESIZE_ACK, |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 void set_next_paint_is_resize_ack(); | 349 void set_next_paint_is_resize_ack(); |
345 void set_next_paint_is_restore_ack(); | 350 void set_next_paint_is_restore_ack(); |
346 void set_next_paint_is_repaint_ack(); | 351 void set_next_paint_is_repaint_ack(); |
347 | 352 |
348 void set_throttle_input_events(bool throttle_input_events) { | 353 void set_throttle_input_events(bool throttle_input_events) { |
349 throttle_input_events_ = throttle_input_events; | 354 throttle_input_events_ = throttle_input_events; |
350 } | 355 } |
351 | 356 |
352 // Checks if the text input state and compose inline mode have been changed. | 357 // Checks if the text input state and compose inline mode have been changed. |
353 // If they are changed, the new value will be sent to the browser process. | 358 // If they are changed, the new value will be sent to the browser process. |
354 void UpdateTextInputState(); | 359 // |show_ime_if_needed| should be SHOW_IME_IF_NEEDED iff the update may cause |
| 360 // the ime to be displayed, e.g. after a tap on an input field on mobile. |
| 361 void UpdateTextInputState(ShowIme show_ime); |
355 | 362 |
356 // Checks if the selection bounds have been changed. If they are changed, | 363 // Checks if the selection bounds have been changed. If they are changed, |
357 // the new value will be sent to the browser process. | 364 // the new value will be sent to the browser process. |
358 virtual void UpdateSelectionBounds(); | 365 virtual void UpdateSelectionBounds(); |
359 | 366 |
360 // Checks if the composition range or composition character bounds have been | 367 // Checks if the composition range or composition character bounds have been |
361 // changed. If they are changed, the new value will be sent to the browser | 368 // changed. If they are changed, the new value will be sent to the browser |
362 // process. | 369 // process. |
363 virtual void UpdateCompositionInfo( | 370 virtual void UpdateCompositionInfo( |
364 const ui::Range& range, | 371 const ui::Range& range, |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 // State associated with the BeginSmoothScroll synthetic scrolling function. | 610 // State associated with the BeginSmoothScroll synthetic scrolling function. |
604 int next_smooth_scroll_gesture_id_; | 611 int next_smooth_scroll_gesture_id_; |
605 typedef std::map<int, SmoothScrollCompletionCallback> | 612 typedef std::map<int, SmoothScrollCompletionCallback> |
606 PendingSmoothScrollGestureMap; | 613 PendingSmoothScrollGestureMap; |
607 PendingSmoothScrollGestureMap pending_smooth_scroll_gestures_; | 614 PendingSmoothScrollGestureMap pending_smooth_scroll_gestures_; |
608 | 615 |
609 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 616 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
610 }; | 617 }; |
611 | 618 |
612 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 619 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
OLD | NEW |