Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1093)

Side by Side Diff: content/renderer/render_widget.h

Issue 1388283002: Fix OSK flickering issue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 10
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // This mechanism is not a drop-in replacement for IPC: messages sent this way 237 // This mechanism is not a drop-in replacement for IPC: messages sent this way
238 // will not be automatically available to BrowserMessageFilter, for example. 238 // will not be automatically available to BrowserMessageFilter, for example.
239 // FIFO ordering is preserved between messages enqueued with the same 239 // FIFO ordering is preserved between messages enqueued with the same
240 // |policy|, the ordering between messages enqueued for different policies is 240 // |policy|, the ordering between messages enqueued for different policies is
241 // undefined. 241 // undefined.
242 // 242 //
243 // |msg| message to send, ownership of |msg| is transferred. 243 // |msg| message to send, ownership of |msg| is transferred.
244 // |policy| see the comment on MessageDeliveryPolicy. 244 // |policy| see the comment on MessageDeliveryPolicy.
245 void QueueMessage(IPC::Message* msg, MessageDeliveryPolicy policy); 245 void QueueMessage(IPC::Message* msg, MessageDeliveryPolicy policy);
246 246
247 // Handle common setup/teardown for handling IME events. 247 // Handle start and finish of IME event guard.
248 void StartHandlingImeEvent(); 248 void OnImeEventGuardStart();
249 void FinishHandlingImeEvent(); 249 void OnImeEventGuardFinish(bool from_non_ime);
250 250
251 // Returns whether we currently should handle an IME event. 251 // Returns whether we currently should handle an IME event.
252 bool ShouldHandleImeEvent(); 252 bool ShouldHandleImeEvent();
253 253
254 // Called by the compositor when page scale animation completed. 254 // Called by the compositor when page scale animation completed.
255 virtual void DidCompletePageScaleAnimation() {} 255 virtual void DidCompletePageScaleAnimation() {}
256 256
257 // When paused in debugger, we send ack for mouse event early. This ensures 257 // When paused in debugger, we send ack for mouse event early. This ensures
258 // that we continue receiving mouse moves and pass them to debugger. Returns 258 // that we continue receiving mouse moves and pass them to debugger. Returns
259 // whether we are paused in mouse move event and have sent the ack. 259 // whether we are paused in mouse move event and have sent the ack.
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 654
655 // Are we currently handling an input event? 655 // Are we currently handling an input event?
656 bool handling_input_event_; 656 bool handling_input_event_;
657 657
658 // Used to intercept overscroll notifications while an event is being 658 // Used to intercept overscroll notifications while an event is being
659 // handled. If the event causes overscroll, the overscroll metadata can be 659 // handled. If the event causes overscroll, the overscroll metadata can be
660 // bundled in the event ack, saving an IPC. Note that we must continue 660 // bundled in the event ack, saving an IPC. Note that we must continue
661 // supporting overscroll IPC notifications due to fling animation updates. 661 // supporting overscroll IPC notifications due to fling animation updates.
662 scoped_ptr<DidOverscrollParams>* handling_event_overscroll_; 662 scoped_ptr<DidOverscrollParams>* handling_event_overscroll_;
663 663
664 // Are we currently handling an ime event? 664 // The number of IME events we are handling now.
665 bool handling_ime_event_; 665 int ime_guard_count_;
666 // We intentionally ignore text input update while we are handling IME events,
667 // but show_ime should be effective even if it was set in the middle of
668 // ignored state updates.
669 bool pending_show_ime_if_needed_;
666 670
667 // Type of the input event we are currently handling. 671 // Type of the input event we are currently handling.
668 blink::WebInputEvent::Type handling_event_type_; 672 blink::WebInputEvent::Type handling_event_type_;
669 673
670 // Whether we should not send ack for the current mouse move. 674 // Whether we should not send ack for the current mouse move.
671 bool ignore_ack_for_mouse_move_from_debugger_; 675 bool ignore_ack_for_mouse_move_from_debugger_;
672 676
673 // True if we have requested this widget be closed. No more messages will 677 // True if we have requested this widget be closed. No more messages will
674 // be sent, except for a Close. 678 // be sent, except for a Close.
675 bool closing_; 679 bool closing_;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 std::queue<SyntheticGestureCompletionCallback> 756 std::queue<SyntheticGestureCompletionCallback>
753 pending_synthetic_gesture_callbacks_; 757 pending_synthetic_gesture_callbacks_;
754 758
755 uint32 next_output_surface_id_; 759 uint32 next_output_surface_id_;
756 760
757 #if defined(OS_ANDROID) 761 #if defined(OS_ANDROID)
758 // Indicates value in the focused text field is in dirty state, i.e. modified 762 // Indicates value in the focused text field is in dirty state, i.e. modified
759 // by script etc., not by user input. 763 // by script etc., not by user input.
760 bool text_field_is_dirty_; 764 bool text_field_is_dirty_;
761 765
766 // AdapterInputConnection make real changes only when it's not originating
767 // from IME. We want non-keyboard events (e.g., long-press events) to be
768 // treated as NOT originating from IME, when we finish handling these events.
769 bool pending_update_from_non_ime_;
770
762 // Stores the history of text input infos from the last ACK'ed one from the 771 // Stores the history of text input infos from the last ACK'ed one from the
763 // current one. The size is the number of pending ACKs plus one, since we 772 // current one. The size is the number of pending ACKs plus one, since we
764 // intentionally keep the last ack'd value to know what the browser is 773 // intentionally keep the last ack'd value to know what the browser is
765 // currently aware of. 774 // currently aware of.
766 std::deque<blink::WebTextInputInfo> text_input_info_history_; 775 std::deque<blink::WebTextInputInfo> text_input_info_history_;
767 #endif 776 #endif
768 777
769 scoped_ptr<ScreenMetricsEmulator> screen_metrics_emulator_; 778 scoped_ptr<ScreenMetricsEmulator> screen_metrics_emulator_;
770 779
771 // Popups may be displaced when screen metrics emulation is enabled. 780 // Popups may be displaced when screen metrics emulation is enabled.
(...skipping 23 matching lines...) Expand all
795 804
796 scoped_ptr<scheduler::RenderWidgetSchedulingState> 805 scoped_ptr<scheduler::RenderWidgetSchedulingState>
797 render_widget_scheduling_state_; 806 render_widget_scheduling_state_;
798 807
799 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 808 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
800 }; 809 };
801 810
802 } // namespace content 811 } // namespace content
803 812
804 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 813 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698