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 | 10 |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 void OnPaintAtSize(const TransportDIB::Handle& dib_id, | 347 void OnPaintAtSize(const TransportDIB::Handle& dib_id, |
348 int tag, | 348 int tag, |
349 const gfx::Size& page_size, | 349 const gfx::Size& page_size, |
350 const gfx::Size& desired_size); | 350 const gfx::Size& desired_size); |
351 void OnRepaint(gfx::Size size_to_paint); | 351 void OnRepaint(gfx::Size size_to_paint); |
352 void OnSyntheticGestureCompleted(); | 352 void OnSyntheticGestureCompleted(); |
353 void OnSetTextDirection(WebKit::WebTextDirection direction); | 353 void OnSetTextDirection(WebKit::WebTextDirection direction); |
354 void OnGetFPS(); | 354 void OnGetFPS(); |
355 void OnUpdateScreenRects(const gfx::Rect& view_screen_rect, | 355 void OnUpdateScreenRects(const gfx::Rect& view_screen_rect, |
356 const gfx::Rect& window_screen_rect); | 356 const gfx::Rect& window_screen_rect); |
| 357 #if defined(OS_ANDROID) || defined(USE_AURA) |
357 #if defined(OS_ANDROID) | 358 #if defined(OS_ANDROID) |
358 void OnShowImeIfNeeded(); | 359 void OnShowImeIfNeeded(); |
| 360 #endif |
359 | 361 |
360 // Whenever an IME event that needs an acknowledgement is sent to the browser, | 362 // Whenever an IME event that needs an acknowledgement is sent to the browser, |
361 // the number of outstanding IME events that needs acknowledgement should be | 363 // the number of outstanding IME events that needs acknowledgement should be |
362 // incremented. All IME events will be dropped until we receive an ack from | 364 // incremented. All IME events will be dropped until we receive an ack from |
363 // the browser. | 365 // the browser. |
364 void IncrementOutstandingImeEventAcks(); | 366 void IncrementOutstandingImeEventAcks(); |
365 | 367 |
366 // Called by the browser process for every required IME acknowledgement. | 368 // Called by the browser process for every required IME acknowledgement. |
367 void OnImeEventAck(); | 369 void OnImeEventAck(); |
368 #endif | 370 #endif |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 bool next_paint_is_resize_ack() const; | 440 bool next_paint_is_resize_ack() const; |
439 bool next_paint_is_restore_ack() const; | 441 bool next_paint_is_restore_ack() const; |
440 void set_next_paint_is_resize_ack(); | 442 void set_next_paint_is_resize_ack(); |
441 void set_next_paint_is_restore_ack(); | 443 void set_next_paint_is_restore_ack(); |
442 void set_next_paint_is_repaint_ack(); | 444 void set_next_paint_is_repaint_ack(); |
443 | 445 |
444 // Checks if the text input state and compose inline mode have been changed. | 446 // Checks if the text input state and compose inline mode have been changed. |
445 // If they are changed, the new value will be sent to the browser process. | 447 // If they are changed, the new value will be sent to the browser process. |
446 void UpdateTextInputType(); | 448 void UpdateTextInputType(); |
447 | 449 |
448 #if defined(OS_ANDROID) | 450 #if defined(OS_ANDROID) || defined(USE_AURA) |
449 // |show_ime_if_needed| should be true iff the update may cause the ime to be | 451 // |show_ime_if_needed| should be true iff the update may cause the ime to be |
450 // displayed, e.g. after a tap on an input field on mobile. | 452 // displayed, e.g. after a tap on an input field on mobile. |
451 // |send_ime_ack| should be true iff the browser side is required to | 453 // |send_ime_ack| should be true iff the browser side is required to |
452 // acknowledge the change before the renderer handles any more IME events. | 454 // acknowledge the change before the renderer handles any more IME events. |
453 // This is when the event did not originate from the browser side IME, such as | 455 // This is when the event did not originate from the browser side IME, such as |
454 // changes from JavaScript or autofill. | 456 // changes from JavaScript or autofill. |
455 void UpdateTextInputState(bool show_ime_if_needed, bool send_ime_ack); | 457 void UpdateTextInputState(bool show_ime_if_needed, bool send_ime_ack); |
456 #endif | 458 #endif |
457 | 459 |
458 // Checks if the selection bounds have been changed. If they are changed, | 460 // Checks if the selection bounds have been changed. If they are changed, |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 // The last set of rendering stats received from the browser. This is only | 765 // The last set of rendering stats received from the browser. This is only |
764 // received when using the --enable-gpu-benchmarking flag. | 766 // received when using the --enable-gpu-benchmarking flag. |
765 BrowserRenderingStats browser_rendering_stats_; | 767 BrowserRenderingStats browser_rendering_stats_; |
766 | 768 |
767 // The latency information for any current non-accelerated-compositing | 769 // The latency information for any current non-accelerated-compositing |
768 // frame. | 770 // frame. |
769 ui::LatencyInfo latency_info_; | 771 ui::LatencyInfo latency_info_; |
770 | 772 |
771 uint32 next_output_surface_id_; | 773 uint32 next_output_surface_id_; |
772 | 774 |
773 #if defined(OS_ANDROID) | 775 #if defined(OS_ANDROID) || defined(USE_AURA) |
774 // A counter for number of outstanding messages from the renderer to the | 776 // A counter for number of outstanding messages from the renderer to the |
775 // browser regarding IME-type events that have not been acknowledged by the | 777 // browser regarding IME-type events that have not been acknowledged by the |
776 // browser. If this value is not 0 IME events will be dropped. | 778 // browser. If this value is not 0 IME events will be dropped. |
777 int outstanding_ime_acks_; | 779 int outstanding_ime_acks_; |
778 #endif | 780 #endif |
779 | 781 |
780 scoped_ptr<ScreenMetricsEmulator> screen_metrics_emulator_; | 782 scoped_ptr<ScreenMetricsEmulator> screen_metrics_emulator_; |
781 | 783 |
782 // Popups may be displaced when screen metrics emulation is enabled. | 784 // Popups may be displaced when screen metrics emulation is enabled. |
783 // These values are used to properly adjust popup position. | 785 // These values are used to properly adjust popup position. |
784 gfx::Point popup_view_origin_for_emulation_; | 786 gfx::Point popup_view_origin_for_emulation_; |
785 gfx::Point popup_screen_origin_for_emulation_; | 787 gfx::Point popup_screen_origin_for_emulation_; |
786 float popup_origin_scale_for_emulation_; | 788 float popup_origin_scale_for_emulation_; |
787 | 789 |
788 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_; | 790 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_; |
789 | 791 |
790 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 792 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
791 }; | 793 }; |
792 | 794 |
793 } // namespace content | 795 } // namespace content |
794 | 796 |
795 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 797 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
OLD | NEW |