Chromium Code Reviews| 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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 324 const gfx::Size& desired_size); | 324 const gfx::Size& desired_size); |
| 325 void OnRepaint(gfx::Size size_to_paint); | 325 void OnRepaint(gfx::Size size_to_paint); |
| 326 void OnSmoothScrollCompleted(); | 326 void OnSmoothScrollCompleted(); |
| 327 void OnSetTextDirection(WebKit::WebTextDirection direction); | 327 void OnSetTextDirection(WebKit::WebTextDirection direction); |
| 328 void OnGetFPS(); | 328 void OnGetFPS(); |
| 329 void OnUpdateScreenRects(const gfx::Rect& view_screen_rect, | 329 void OnUpdateScreenRects(const gfx::Rect& view_screen_rect, |
| 330 const gfx::Rect& window_screen_rect); | 330 const gfx::Rect& window_screen_rect); |
| 331 #if defined(OS_ANDROID) | 331 #if defined(OS_ANDROID) |
| 332 void OnImeBatchStateChanged(bool is_begin); | 332 void OnImeBatchStateChanged(bool is_begin); |
| 333 void OnShowImeIfNeeded(); | 333 void OnShowImeIfNeeded(); |
| 334 // Returns whether ordered IME processing has been enabled. | |
|
Seigo Nonaka
2013/07/10 02:22:17
nit: newline between comment and next function?
nyquist
2013/07/12 05:55:24
Done.
| |
| 335 bool has_ordered_ime_processing() { return has_ordered_ime_processing_; } | |
| 336 // Whenever an IME event that needs an acknowledgement is sent to the browser, | |
| 337 // the number of outstanding IME events that needs acknowledgement should be | |
| 338 // incremented. | |
| 339 void IncrementOutstandingImeEventAcks(); | |
| 340 // If there are outstanding IME events that needs to be acknowledged, all | |
| 341 // new IME events should be discarded. This only returns true if ordered IME | |
| 342 // processing is enabled. | |
| 343 bool HasOutstandingImeEventAcks(); | |
| 344 // Called by the browser process for every required IME acknowledgement. | |
| 345 void OnImeEventAck(); | |
| 334 #endif | 346 #endif |
| 347 // Returns whether we currently should handle an IME event. | |
| 348 bool ShouldHandleImeEvent(); | |
| 349 | |
| 335 void OnSnapshot(const gfx::Rect& src_subrect); | 350 void OnSnapshot(const gfx::Rect& src_subrect); |
| 336 void OnSetBrowserRenderingStats(const BrowserRenderingStats& stats); | 351 void OnSetBrowserRenderingStats(const BrowserRenderingStats& stats); |
| 337 | 352 |
| 338 // Notify the compositor about a change in viewport size. This should be | 353 // Notify the compositor about a change in viewport size. This should be |
| 339 // used only with auto resize mode WebWidgets, as normal WebWidgets should | 354 // used only with auto resize mode WebWidgets, as normal WebWidgets should |
| 340 // go through OnResize. | 355 // go through OnResize. |
| 341 void AutoResizeCompositor(); | 356 void AutoResizeCompositor(); |
| 342 | 357 |
| 343 virtual void SetDeviceScaleFactor(float device_scale_factor); | 358 virtual void SetDeviceScaleFactor(float device_scale_factor); |
| 344 | 359 |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 708 bool is_threaded_compositing_enabled_; | 723 bool is_threaded_compositing_enabled_; |
| 709 | 724 |
| 710 // The last set of rendering stats received from the browser. This is only | 725 // The last set of rendering stats received from the browser. This is only |
| 711 // received when using the --enable-gpu-benchmarking flag. | 726 // received when using the --enable-gpu-benchmarking flag. |
| 712 BrowserRenderingStats browser_rendering_stats_; | 727 BrowserRenderingStats browser_rendering_stats_; |
| 713 | 728 |
| 714 // The latency information for any current non-accelerated-compositing | 729 // The latency information for any current non-accelerated-compositing |
| 715 // frame. | 730 // frame. |
| 716 ui::LatencyInfo latency_info_; | 731 ui::LatencyInfo latency_info_; |
| 717 | 732 |
| 733 #if defined(OS_ANDROID) | |
| 734 // Specifies if the ordered IME processing has been enabled. | |
| 735 bool has_ordered_ime_processing_; | |
| 736 | |
| 737 // A counter for number of outstanding messages from the renderer to the | |
| 738 // browser regarding IME-type events that have not been acknowledged by the | |
| 739 // browser. | |
| 740 int outstanding_ime_acks_; | |
| 741 #endif | |
| 742 | |
| 718 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_; | 743 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_; |
| 719 | 744 |
| 720 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 745 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 721 }; | 746 }; |
| 722 | 747 |
| 723 } // namespace content | 748 } // namespace content |
| 724 | 749 |
| 725 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 750 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |