| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 void UpdateSelectionBounds(); | 344 void UpdateSelectionBounds(); |
| 345 | 345 |
| 346 virtual void GetSelectionBounds(gfx::Rect* start, gfx::Rect* end); | 346 virtual void GetSelectionBounds(gfx::Rect* start, gfx::Rect* end); |
| 347 | 347 |
| 348 void OnShowHostContextMenu(ContextMenuParams* params); | 348 void OnShowHostContextMenu(ContextMenuParams* params); |
| 349 | 349 |
| 350 // Checks if the composition range or composition character bounds have been | 350 // Checks if the composition range or composition character bounds have been |
| 351 // changed. If they are changed, the new value will be sent to the browser | 351 // changed. If they are changed, the new value will be sent to the browser |
| 352 // process. This method does nothing when the browser process is not able to | 352 // process. This method does nothing when the browser process is not able to |
| 353 // handle composition range and composition character bounds. | 353 // handle composition range and composition character bounds. |
| 354 void UpdateCompositionInfo(bool should_update_range); | 354 // If immediate_request is true, render sends the latest composition info to |
| 355 // the browser even if the composition info is not changed. |
| 356 void UpdateCompositionInfo(bool immediate_request); |
| 355 | 357 |
| 356 // Change the device ICC color profile while running a layout test. | 358 // Change the device ICC color profile while running a layout test. |
| 357 void SetDeviceColorProfileForTesting(const std::vector<char>& color_profile); | 359 void SetDeviceColorProfileForTesting(const std::vector<char>& color_profile); |
| 358 void ResetDeviceColorProfileForTesting(); | 360 void ResetDeviceColorProfileForTesting(); |
| 359 | 361 |
| 360 // Called when the Widget has changed size as a result of an auto-resize. | 362 // Called when the Widget has changed size as a result of an auto-resize. |
| 361 void DidAutoResize(const gfx::Size& new_size); | 363 void DidAutoResize(const gfx::Size& new_size); |
| 362 | 364 |
| 363 // Indicates whether this widget has focus. | 365 // Indicates whether this widget has focus. |
| 364 bool has_focus() const { return has_focus_; } | 366 bool has_focus() const { return has_focus_; } |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 // Called when we send IME event that expects an ACK. | 480 // Called when we send IME event that expects an ACK. |
| 479 void OnImeEventSentForAck(const blink::WebTextInputInfo& info); | 481 void OnImeEventSentForAck(const blink::WebTextInputInfo& info); |
| 480 | 482 |
| 481 // Called by the browser process for every required IME acknowledgement. | 483 // Called by the browser process for every required IME acknowledgement. |
| 482 void OnImeEventAck(); | 484 void OnImeEventAck(); |
| 483 | 485 |
| 484 // Called by the browser process to update text input state. | 486 // Called by the browser process to update text input state. |
| 485 void OnRequestTextInputStateUpdate(); | 487 void OnRequestTextInputStateUpdate(); |
| 486 #endif | 488 #endif |
| 487 | 489 |
| 490 // Called by the browser process to update the cursor and composition |
| 491 // information. |
| 492 void OnRequestCompositionUpdate(bool immediate_request, bool monitor_request); |
| 493 |
| 488 // Notify the compositor about a change in viewport size. This should be | 494 // Notify the compositor about a change in viewport size. This should be |
| 489 // used only with auto resize mode WebWidgets, as normal WebWidgets should | 495 // used only with auto resize mode WebWidgets, as normal WebWidgets should |
| 490 // go through OnResize. | 496 // go through OnResize. |
| 491 void AutoResizeCompositor(); | 497 void AutoResizeCompositor(); |
| 492 | 498 |
| 493 virtual void SetDeviceScaleFactor(float device_scale_factor); | 499 virtual void SetDeviceScaleFactor(float device_scale_factor); |
| 494 bool SetDeviceColorProfile(const std::vector<char>& color_profile); | 500 bool SetDeviceColorProfile(const std::vector<char>& color_profile); |
| 495 | 501 |
| 496 virtual void OnOrientationChange(); | 502 virtual void OnOrientationChange(); |
| 497 | 503 |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 // by script etc., not by user input. | 728 // by script etc., not by user input. |
| 723 bool text_field_is_dirty_; | 729 bool text_field_is_dirty_; |
| 724 | 730 |
| 725 // Stores the history of text input infos from the last ACK'ed one from the | 731 // Stores the history of text input infos from the last ACK'ed one from the |
| 726 // current one. The size is the number of pending ACKs plus one, since we | 732 // current one. The size is the number of pending ACKs plus one, since we |
| 727 // intentionally keep the last ack'd value to know what the browser is | 733 // intentionally keep the last ack'd value to know what the browser is |
| 728 // currently aware of. | 734 // currently aware of. |
| 729 std::deque<blink::WebTextInputInfo> text_input_info_history_; | 735 std::deque<blink::WebTextInputInfo> text_input_info_history_; |
| 730 #endif | 736 #endif |
| 731 | 737 |
| 738 // True if the IME requests updated composition info. |
| 739 bool monitor_composition_info_; |
| 740 |
| 732 std::unique_ptr<RenderWidgetScreenMetricsEmulator> screen_metrics_emulator_; | 741 std::unique_ptr<RenderWidgetScreenMetricsEmulator> screen_metrics_emulator_; |
| 733 | 742 |
| 734 // Popups may be displaced when screen metrics emulation is enabled. | 743 // Popups may be displaced when screen metrics emulation is enabled. |
| 735 // These values are used to properly adjust popup position. | 744 // These values are used to properly adjust popup position. |
| 736 gfx::Point popup_view_origin_for_emulation_; | 745 gfx::Point popup_view_origin_for_emulation_; |
| 737 gfx::Point popup_screen_origin_for_emulation_; | 746 gfx::Point popup_screen_origin_for_emulation_; |
| 738 float popup_origin_scale_for_emulation_; | 747 float popup_origin_scale_for_emulation_; |
| 739 | 748 |
| 740 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_; | 749 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_; |
| 741 std::unique_ptr<ResizingModeSelector> resizing_mode_selector_; | 750 std::unique_ptr<ResizingModeSelector> resizing_mode_selector_; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 770 | 779 |
| 771 // Indicates whether this widget has focus. | 780 // Indicates whether this widget has focus. |
| 772 bool has_focus_; | 781 bool has_focus_; |
| 773 | 782 |
| 774 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 783 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 775 }; | 784 }; |
| 776 | 785 |
| 777 } // namespace content | 786 } // namespace content |
| 778 | 787 |
| 779 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 788 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |