| 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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 // This mechanism is not a drop-in replacement for IPC: messages sent this way | 312 // This mechanism is not a drop-in replacement for IPC: messages sent this way |
| 313 // will not be automatically available to BrowserMessageFilter, for example. | 313 // will not be automatically available to BrowserMessageFilter, for example. |
| 314 // FIFO ordering is preserved between messages enqueued with the same | 314 // FIFO ordering is preserved between messages enqueued with the same |
| 315 // |policy|, the ordering between messages enqueued for different policies is | 315 // |policy|, the ordering between messages enqueued for different policies is |
| 316 // undefined. | 316 // undefined. |
| 317 // | 317 // |
| 318 // |msg| message to send, ownership of |msg| is transferred. | 318 // |msg| message to send, ownership of |msg| is transferred. |
| 319 // |policy| see the comment on MessageDeliveryPolicy. | 319 // |policy| see the comment on MessageDeliveryPolicy. |
| 320 void QueueMessage(IPC::Message* msg, MessageDeliveryPolicy policy); | 320 void QueueMessage(IPC::Message* msg, MessageDeliveryPolicy policy); |
| 321 | 321 |
| 322 // Check whether IME thread is being used or not. |
| 323 bool IsUsingImeThread(); |
| 324 |
| 322 // Handle start and finish of IME event guard. | 325 // Handle start and finish of IME event guard. |
| 323 void OnImeEventGuardStart(ImeEventGuard* guard); | 326 void OnImeEventGuardStart(ImeEventGuard* guard); |
| 324 void OnImeEventGuardFinish(ImeEventGuard* guard); | 327 void OnImeEventGuardFinish(ImeEventGuard* guard); |
| 325 | 328 |
| 326 // Returns whether we currently should handle an IME event. | 329 // Returns whether we currently should handle an IME event. |
| 327 bool ShouldHandleImeEvent(); | 330 bool ShouldHandleImeEvent(); |
| 328 | 331 |
| 329 void SetPopupOriginAdjustmentsForEmulation( | 332 void SetPopupOriginAdjustmentsForEmulation( |
| 330 RenderWidgetScreenMetricsEmulator* emulator); | 333 RenderWidgetScreenMetricsEmulator* emulator); |
| 331 | 334 |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 void OnShowImeIfNeeded(); | 457 void OnShowImeIfNeeded(); |
| 455 void OnSetSurfaceIdNamespace(uint32_t surface_id_namespace); | 458 void OnSetSurfaceIdNamespace(uint32_t surface_id_namespace); |
| 456 void OnHandleCompositorProto(const std::vector<uint8_t>& proto); | 459 void OnHandleCompositorProto(const std::vector<uint8_t>& proto); |
| 457 | 460 |
| 458 #if defined(OS_ANDROID) | 461 #if defined(OS_ANDROID) |
| 459 // Called when we send IME event that expects an ACK. | 462 // Called when we send IME event that expects an ACK. |
| 460 void OnImeEventSentForAck(const blink::WebTextInputInfo& info); | 463 void OnImeEventSentForAck(const blink::WebTextInputInfo& info); |
| 461 | 464 |
| 462 // Called by the browser process for every required IME acknowledgement. | 465 // Called by the browser process for every required IME acknowledgement. |
| 463 void OnImeEventAck(); | 466 void OnImeEventAck(); |
| 467 |
| 468 // Called by the browser process to update text input state. |
| 469 void OnRequestTextInputStateUpdate(); |
| 470 |
| 471 // Called by the browser process to disable IME thread. |
| 472 void OnDisableImeThread(); |
| 464 #endif | 473 #endif |
| 465 | 474 |
| 466 // Notify the compositor about a change in viewport size. This should be | 475 // Notify the compositor about a change in viewport size. This should be |
| 467 // used only with auto resize mode WebWidgets, as normal WebWidgets should | 476 // used only with auto resize mode WebWidgets, as normal WebWidgets should |
| 468 // go through OnResize. | 477 // go through OnResize. |
| 469 void AutoResizeCompositor(); | 478 void AutoResizeCompositor(); |
| 470 | 479 |
| 471 virtual void SetDeviceScaleFactor(float device_scale_factor); | 480 virtual void SetDeviceScaleFactor(float device_scale_factor); |
| 472 virtual bool SetDeviceColorProfile(const std::vector<char>& color_profile); | 481 virtual bool SetDeviceColorProfile(const std::vector<char>& color_profile); |
| 473 virtual void ResetDeviceColorProfileForTesting(); | 482 virtual void ResetDeviceColorProfileForTesting(); |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 std::queue<SyntheticGestureCompletionCallback> | 724 std::queue<SyntheticGestureCompletionCallback> |
| 716 pending_synthetic_gesture_callbacks_; | 725 pending_synthetic_gesture_callbacks_; |
| 717 | 726 |
| 718 uint32_t next_output_surface_id_; | 727 uint32_t next_output_surface_id_; |
| 719 | 728 |
| 720 #if defined(OS_ANDROID) | 729 #if defined(OS_ANDROID) |
| 721 // Indicates value in the focused text field is in dirty state, i.e. modified | 730 // Indicates value in the focused text field is in dirty state, i.e. modified |
| 722 // by script etc., not by user input. | 731 // by script etc., not by user input. |
| 723 bool text_field_is_dirty_; | 732 bool text_field_is_dirty_; |
| 724 | 733 |
| 734 // True if we disabled IME thread due to an error. |
| 735 bool ime_thread_disabled_due_to_error_; |
| 736 |
| 725 // Stores the history of text input infos from the last ACK'ed one from the | 737 // 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 | 738 // 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 | 739 // intentionally keep the last ack'd value to know what the browser is |
| 728 // currently aware of. | 740 // currently aware of. |
| 729 std::deque<blink::WebTextInputInfo> text_input_info_history_; | 741 std::deque<blink::WebTextInputInfo> text_input_info_history_; |
| 730 #endif | 742 #endif |
| 731 | 743 |
| 732 scoped_ptr<RenderWidgetScreenMetricsEmulator> screen_metrics_emulator_; | 744 scoped_ptr<RenderWidgetScreenMetricsEmulator> screen_metrics_emulator_; |
| 733 | 745 |
| 734 // Popups may be displaced when screen metrics emulation is enabled. | 746 // Popups may be displaced when screen metrics emulation is enabled. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 757 | 769 |
| 758 scoped_ptr<scheduler::RenderWidgetSchedulingState> | 770 scoped_ptr<scheduler::RenderWidgetSchedulingState> |
| 759 render_widget_scheduling_state_; | 771 render_widget_scheduling_state_; |
| 760 | 772 |
| 761 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 773 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 762 }; | 774 }; |
| 763 | 775 |
| 764 } // namespace content | 776 } // namespace content |
| 765 | 777 |
| 766 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 778 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |