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