| 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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 void UpdateSelectionBounds(); | 345 void UpdateSelectionBounds(); |
| 346 | 346 |
| 347 virtual void GetSelectionBounds(gfx::Rect* start, gfx::Rect* end); | 347 virtual void GetSelectionBounds(gfx::Rect* start, gfx::Rect* end); |
| 348 | 348 |
| 349 void OnShowHostContextMenu(ContextMenuParams* params); | 349 void OnShowHostContextMenu(ContextMenuParams* params); |
| 350 | 350 |
| 351 // Checks if the composition range or composition character bounds have been | 351 // Checks if the composition range or composition character bounds have been |
| 352 // changed. If they are changed, the new value will be sent to the browser | 352 // changed. If they are changed, the new value will be sent to the browser |
| 353 // process. This method does nothing when the browser process is not able to | 353 // process. This method does nothing when the browser process is not able to |
| 354 // handle composition range and composition character bounds. | 354 // handle composition range and composition character bounds. |
| 355 void UpdateCompositionInfo(bool should_update_range); | 355 // If immediate_request is true, render sends the latest composition info to |
| 356 // the browser even if the composition info is not changed. |
| 357 void UpdateCompositionInfo(bool immediate_request); |
| 356 | 358 |
| 357 // Change the device ICC color profile while running a layout test. | 359 // Change the device ICC color profile while running a layout test. |
| 358 void SetDeviceColorProfileForTesting(const std::vector<char>& color_profile); | 360 void SetDeviceColorProfileForTesting(const std::vector<char>& color_profile); |
| 359 void ResetDeviceColorProfileForTesting(); | 361 void ResetDeviceColorProfileForTesting(); |
| 360 | 362 |
| 361 // Called when the Widget has changed size as a result of an auto-resize. | 363 // Called when the Widget has changed size as a result of an auto-resize. |
| 362 void DidAutoResize(const gfx::Size& new_size); | 364 void DidAutoResize(const gfx::Size& new_size); |
| 363 | 365 |
| 364 // Called to get the position of the root window containing the widget in | 366 // Called to get the position of the root window containing the widget in |
| 365 // screen coordinates. | 367 // screen coordinates. |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 // Called when we send IME event that expects an ACK. | 489 // Called when we send IME event that expects an ACK. |
| 488 void OnImeEventSentForAck(const blink::WebTextInputInfo& info); | 490 void OnImeEventSentForAck(const blink::WebTextInputInfo& info); |
| 489 | 491 |
| 490 // Called by the browser process for every required IME acknowledgement. | 492 // Called by the browser process for every required IME acknowledgement. |
| 491 void OnImeEventAck(); | 493 void OnImeEventAck(); |
| 492 | 494 |
| 493 // Called by the browser process to update text input state. | 495 // Called by the browser process to update text input state. |
| 494 void OnRequestTextInputStateUpdate(); | 496 void OnRequestTextInputStateUpdate(); |
| 495 #endif | 497 #endif |
| 496 | 498 |
| 499 // Called by the browser process to update the cursor and composition |
| 500 // information. |
| 501 void OnRequestCompositionUpdate(bool immediate_request, bool monitor_request); |
| 502 |
| 497 // Notify the compositor about a change in viewport size. This should be | 503 // Notify the compositor about a change in viewport size. This should be |
| 498 // used only with auto resize mode WebWidgets, as normal WebWidgets should | 504 // used only with auto resize mode WebWidgets, as normal WebWidgets should |
| 499 // go through OnResize. | 505 // go through OnResize. |
| 500 void AutoResizeCompositor(); | 506 void AutoResizeCompositor(); |
| 501 | 507 |
| 502 virtual void SetDeviceScaleFactor(float device_scale_factor); | 508 virtual void SetDeviceScaleFactor(float device_scale_factor); |
| 503 bool SetDeviceColorProfile(const std::vector<char>& color_profile); | 509 bool SetDeviceColorProfile(const std::vector<char>& color_profile); |
| 504 | 510 |
| 505 virtual void OnOrientationChange(); | 511 virtual void OnOrientationChange(); |
| 506 | 512 |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 // by script etc., not by user input. | 737 // by script etc., not by user input. |
| 732 bool text_field_is_dirty_; | 738 bool text_field_is_dirty_; |
| 733 | 739 |
| 734 // Stores the history of text input infos from the last ACK'ed one from the | 740 // Stores the history of text input infos from the last ACK'ed one from the |
| 735 // current one. The size is the number of pending ACKs plus one, since we | 741 // current one. The size is the number of pending ACKs plus one, since we |
| 736 // intentionally keep the last ack'd value to know what the browser is | 742 // intentionally keep the last ack'd value to know what the browser is |
| 737 // currently aware of. | 743 // currently aware of. |
| 738 std::deque<blink::WebTextInputInfo> text_input_info_history_; | 744 std::deque<blink::WebTextInputInfo> text_input_info_history_; |
| 739 #endif | 745 #endif |
| 740 | 746 |
| 747 // True if the IME requests updated composition info. |
| 748 bool monitor_composition_info_; |
| 749 |
| 741 std::unique_ptr<RenderWidgetScreenMetricsEmulator> screen_metrics_emulator_; | 750 std::unique_ptr<RenderWidgetScreenMetricsEmulator> screen_metrics_emulator_; |
| 742 | 751 |
| 743 // Popups may be displaced when screen metrics emulation is enabled. | 752 // Popups may be displaced when screen metrics emulation is enabled. |
| 744 // These values are used to properly adjust popup position. | 753 // These values are used to properly adjust popup position. |
| 745 gfx::Point popup_view_origin_for_emulation_; | 754 gfx::Point popup_view_origin_for_emulation_; |
| 746 gfx::Point popup_screen_origin_for_emulation_; | 755 gfx::Point popup_screen_origin_for_emulation_; |
| 747 float popup_origin_scale_for_emulation_; | 756 float popup_origin_scale_for_emulation_; |
| 748 | 757 |
| 749 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_; | 758 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_; |
| 750 std::unique_ptr<ResizingModeSelector> resizing_mode_selector_; | 759 std::unique_ptr<ResizingModeSelector> resizing_mode_selector_; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 783 // This reference is set by the RenderFrame and is used to query the IME- | 792 // This reference is set by the RenderFrame and is used to query the IME- |
| 784 // related state from the plugin to later send to the browser. | 793 // related state from the plugin to later send to the browser. |
| 785 PepperPluginInstanceImpl* focused_pepper_plugin_; | 794 PepperPluginInstanceImpl* focused_pepper_plugin_; |
| 786 | 795 |
| 787 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 796 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 788 }; | 797 }; |
| 789 | 798 |
| 790 } // namespace content | 799 } // namespace content |
| 791 | 800 |
| 792 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 801 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |