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