| 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 void UpdateCompositionInfo(bool should_update_range, bool force_update); |
| 356 | 356 |
| 357 // Change the device ICC color profile while running a layout test. | 357 // Change the device ICC color profile while running a layout test. |
| 358 void SetDeviceColorProfileForTesting(const std::vector<char>& color_profile); | 358 void SetDeviceColorProfileForTesting(const std::vector<char>& color_profile); |
| 359 void ResetDeviceColorProfileForTesting(); | 359 void ResetDeviceColorProfileForTesting(); |
| 360 | 360 |
| 361 // Indicates whether this widget has focus. | 361 // Indicates whether this widget has focus. |
| 362 bool has_focus() const { return has_focus_; } | 362 bool has_focus() const { return has_focus_; } |
| 363 | 363 |
| 364 MouseLockDispatcher* mouse_lock_dispatcher() { | 364 MouseLockDispatcher* mouse_lock_dispatcher() { |
| 365 return mouse_lock_dispatcher_.get(); | 365 return mouse_lock_dispatcher_.get(); |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 | 474 |
| 475 #if defined(OS_ANDROID) | 475 #if defined(OS_ANDROID) |
| 476 // Called when we send IME event that expects an ACK. | 476 // Called when we send IME event that expects an ACK. |
| 477 void OnImeEventSentForAck(const blink::WebTextInputInfo& info); | 477 void OnImeEventSentForAck(const blink::WebTextInputInfo& info); |
| 478 | 478 |
| 479 // Called by the browser process for every required IME acknowledgement. | 479 // Called by the browser process for every required IME acknowledgement. |
| 480 void OnImeEventAck(); | 480 void OnImeEventAck(); |
| 481 | 481 |
| 482 // Called by the browser process to update text input state. | 482 // Called by the browser process to update text input state. |
| 483 void OnRequestTextInputStateUpdate(); | 483 void OnRequestTextInputStateUpdate(); |
| 484 |
| 485 // Called by the browser process to update the cursor and composition |
| 486 // information. |
| 487 void OnRequestCursorUpdate(int mode); |
| 484 #endif | 488 #endif |
| 485 | 489 |
| 486 // Notify the compositor about a change in viewport size. This should be | 490 // Notify the compositor about a change in viewport size. This should be |
| 487 // used only with auto resize mode WebWidgets, as normal WebWidgets should | 491 // used only with auto resize mode WebWidgets, as normal WebWidgets should |
| 488 // go through OnResize. | 492 // go through OnResize. |
| 489 void AutoResizeCompositor(); | 493 void AutoResizeCompositor(); |
| 490 | 494 |
| 491 virtual void SetDeviceScaleFactor(float device_scale_factor); | 495 virtual void SetDeviceScaleFactor(float device_scale_factor); |
| 492 bool SetDeviceColorProfile(const std::vector<char>& color_profile); | 496 bool SetDeviceColorProfile(const std::vector<char>& color_profile); |
| 493 | 497 |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 #if defined(OS_ANDROID) | 722 #if defined(OS_ANDROID) |
| 719 // Indicates value in the focused text field is in dirty state, i.e. modified | 723 // Indicates value in the focused text field is in dirty state, i.e. modified |
| 720 // by script etc., not by user input. | 724 // by script etc., not by user input. |
| 721 bool text_field_is_dirty_; | 725 bool text_field_is_dirty_; |
| 722 | 726 |
| 723 // Stores the history of text input infos from the last ACK'ed one from the | 727 // Stores the history of text input infos from the last ACK'ed one from the |
| 724 // current one. The size is the number of pending ACKs plus one, since we | 728 // current one. The size is the number of pending ACKs plus one, since we |
| 725 // intentionally keep the last ack'd value to know what the browser is | 729 // intentionally keep the last ack'd value to know what the browser is |
| 726 // currently aware of. | 730 // currently aware of. |
| 727 std::deque<blink::WebTextInputInfo> text_input_info_history_; | 731 std::deque<blink::WebTextInputInfo> text_input_info_history_; |
| 732 |
| 733 // True if the IME requests updated composition info. |
| 734 bool monitor_composition_info_; |
| 728 #endif | 735 #endif |
| 729 | 736 |
| 730 std::unique_ptr<RenderWidgetScreenMetricsEmulator> screen_metrics_emulator_; | 737 std::unique_ptr<RenderWidgetScreenMetricsEmulator> screen_metrics_emulator_; |
| 731 | 738 |
| 732 // Popups may be displaced when screen metrics emulation is enabled. | 739 // Popups may be displaced when screen metrics emulation is enabled. |
| 733 // These values are used to properly adjust popup position. | 740 // These values are used to properly adjust popup position. |
| 734 gfx::Point popup_view_origin_for_emulation_; | 741 gfx::Point popup_view_origin_for_emulation_; |
| 735 gfx::Point popup_screen_origin_for_emulation_; | 742 gfx::Point popup_screen_origin_for_emulation_; |
| 736 float popup_origin_scale_for_emulation_; | 743 float popup_origin_scale_for_emulation_; |
| 737 | 744 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 768 | 775 |
| 769 // Indicates whether this widget has focus. | 776 // Indicates whether this widget has focus. |
| 770 bool has_focus_; | 777 bool has_focus_; |
| 771 | 778 |
| 772 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 779 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 773 }; | 780 }; |
| 774 | 781 |
| 775 } // namespace content | 782 } // namespace content |
| 776 | 783 |
| 777 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 784 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |