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

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: switched to ime guard approach Created 5 years, 2 months 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
« no previous file with comments | « content/renderer/ime_event_guard.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 common setup/teardown for handling IME events.
248 void StartHandlingImeEvent(); 248 void StartHandlingImeEvent();
249 void FinishHandlingImeEvent(); 249 void FinishHandlingImeEvent(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 handling_ime_events_count_;
aelias_OOO_until_Jul13 2015/10/22 03:25:07 Please rename to "ime_guard_count_". Strictly spe
Changwan Ryu 2015/10/22 06:18:18 Done. Also changed {Start,Finish}HandlingImeEvent
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., touch events) should be
768 // treated as NOT originating from IME, when we finish handling IME events,
769 // such as long press.
770 bool pending_update_from_non_ime_;
aelias_OOO_until_Jul13 2015/10/22 03:25:07 We don't need to add this extra state. We can jus
Changwan Ryu 2015/10/22 06:18:18 Hmm... They are slightly different because when te
771
762 // Stores the history of text input infos from the last ACK'ed one from the 772 // 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 773 // 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 774 // intentionally keep the last ack'd value to know what the browser is
765 // currently aware of. 775 // currently aware of.
766 std::deque<blink::WebTextInputInfo> text_input_info_history_; 776 std::deque<blink::WebTextInputInfo> text_input_info_history_;
767 #endif 777 #endif
768 778
769 scoped_ptr<ScreenMetricsEmulator> screen_metrics_emulator_; 779 scoped_ptr<ScreenMetricsEmulator> screen_metrics_emulator_;
770 780
771 // Popups may be displaced when screen metrics emulation is enabled. 781 // Popups may be displaced when screen metrics emulation is enabled.
(...skipping 23 matching lines...) Expand all
795 805
796 scoped_ptr<scheduler::RenderWidgetSchedulingState> 806 scoped_ptr<scheduler::RenderWidgetSchedulingState>
797 render_widget_scheduling_state_; 807 render_widget_scheduling_state_;
798 808
799 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 809 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
800 }; 810 };
801 811
802 } // namespace content 812 } // namespace content
803 813
804 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 814 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW
« no previous file with comments | « content/renderer/ime_event_guard.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698