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

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

Issue 2470713002: [WIP Approach 1] Straighten up input method reactivation
Patch Set: fix some tests Created 4 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
« no previous file with comments | « content/renderer/render_view_impl.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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 // This mechanism is not a drop-in replacement for IPC: messages sent this way 330 // This mechanism is not a drop-in replacement for IPC: messages sent this way
331 // will not be automatically available to BrowserMessageFilter, for example. 331 // will not be automatically available to BrowserMessageFilter, for example.
332 // FIFO ordering is preserved between messages enqueued with the same 332 // FIFO ordering is preserved between messages enqueued with the same
333 // |policy|, the ordering between messages enqueued for different policies is 333 // |policy|, the ordering between messages enqueued for different policies is
334 // undefined. 334 // undefined.
335 // 335 //
336 // |msg| message to send, ownership of |msg| is transferred. 336 // |msg| message to send, ownership of |msg| is transferred.
337 // |policy| see the comment on MessageDeliveryPolicy. 337 // |policy| see the comment on MessageDeliveryPolicy.
338 void QueueMessage(IPC::Message* msg, MessageDeliveryPolicy policy); 338 void QueueMessage(IPC::Message* msg, MessageDeliveryPolicy policy);
339 339
340 void CancelComposition();
341 void OnFocusedNodeChanged(bool is_editable, const gfx::Rect& node_bounds);
342
340 // Check whether IME thread is being used or not. 343 // Check whether IME thread is being used or not.
341 bool IsUsingImeThread(); 344 bool IsUsingImeThread();
342 345
343 // Handle start and finish of IME event guard. 346 // Handle start and finish of IME event guard.
344 void OnImeEventGuardStart(ImeEventGuard* guard); 347 void OnImeEventGuardStart(ImeEventGuard* guard);
345 void OnImeEventGuardFinish(ImeEventGuard* guard); 348 void OnImeEventGuardFinish(ImeEventGuard* guard);
346 349
347 // Returns whether we currently should handle an IME event. 350 // Returns whether we currently should handle an IME event.
348 bool ShouldHandleImeEvent(); 351 bool ShouldHandleImeEvent();
349 352
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 void OnSyntheticGestureCompleted(); 494 void OnSyntheticGestureCompleted();
492 void OnSetTextDirection(blink::WebTextDirection direction); 495 void OnSetTextDirection(blink::WebTextDirection direction);
493 void OnGetFPS(); 496 void OnGetFPS();
494 void OnUpdateScreenRects(const gfx::Rect& view_screen_rect, 497 void OnUpdateScreenRects(const gfx::Rect& view_screen_rect,
495 const gfx::Rect& window_screen_rect); 498 const gfx::Rect& window_screen_rect);
496 void OnUpdateWindowScreenRect(const gfx::Rect& window_screen_rect); 499 void OnUpdateWindowScreenRect(const gfx::Rect& window_screen_rect);
497 void OnShowImeIfNeeded(); 500 void OnShowImeIfNeeded();
498 void OnSetFrameSinkId(const cc::FrameSinkId& frame_sink_id); 501 void OnSetFrameSinkId(const cc::FrameSinkId& frame_sink_id);
499 void OnHandleCompositorProto(const std::vector<uint8_t>& proto); 502 void OnHandleCompositorProto(const std::vector<uint8_t>& proto);
500 503
504 void UpdateTextInputStateInternal(ShowIme show_ime,
505 ChangeSource change_source,
506 bool ignore_until_ack);
501 #if defined(OS_ANDROID) 507 #if defined(OS_ANDROID)
502 // Called when we send IME event that expects an ACK. 508 // Called when we send IME event that expects an ACK.
503 void OnImeEventSentForAck(const blink::WebTextInputInfo& info); 509 void OnImeEventSentForAck(const blink::WebTextInputInfo& info);
504 510
505 // Called by the browser process for every required IME acknowledgement. 511 // Called by the browser process for every required IME acknowledgement.
506 void OnImeEventAck(); 512 void OnImeEventAck();
507 513
508 // Called by the browser process to update text input state. 514 // Called by the browser process to update text input state.
509 void OnRequestTextInputStateUpdate(); 515 void OnRequestTextInputStateUpdate();
510 516
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 blink::WebDisplayMode display_mode_; 677 blink::WebDisplayMode display_mode_;
672 678
673 // It is possible that one ImeEventGuard is nested inside another 679 // It is possible that one ImeEventGuard is nested inside another
674 // ImeEventGuard. We keep track of the outermost one, and update it as needed. 680 // ImeEventGuard. We keep track of the outermost one, and update it as needed.
675 ImeEventGuard* ime_event_guard_; 681 ImeEventGuard* ime_event_guard_;
676 682
677 // Whether IME is in batch edit mode, in which case we do not update text 683 // Whether IME is in batch edit mode, in which case we do not update text
678 // input state. 684 // input state.
679 bool ime_in_batch_edit_; 685 bool ime_in_batch_edit_;
680 686
687 // Indicates that we will ignore IME related messages from host until the
688 // new text input state update is acked by the host.
689 bool ime_ignore_until_acked_;;
690
691 // A queue of messages to send after we update the text input state.
692 std::vector<IPC::Message*> ime_messages_to_send_after_update_;
693
681 // True if we have requested this widget be closed. No more messages will 694 // True if we have requested this widget be closed. No more messages will
682 // be sent, except for a Close. 695 // be sent, except for a Close.
683 bool closing_; 696 bool closing_;
684 697
685 // True if it is known that the host is in the process of being shut down. 698 // True if it is known that the host is in the process of being shut down.
686 bool host_closing_; 699 bool host_closing_;
687 700
688 // Whether this RenderWidget is currently swapped out, such that the view is 701 // Whether this RenderWidget is currently swapped out, such that the view is
689 // being rendered by another process. If all RenderWidgets in a process are 702 // being rendered by another process. If all RenderWidgets in a process are
690 // swapped out, the process can exit. 703 // swapped out, the process can exit.
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 // Stores edit commands associated to the next key event. 833 // Stores edit commands associated to the next key event.
821 // Will be cleared as soon as the next key event is processed. 834 // Will be cleared as soon as the next key event is processed.
822 EditCommands edit_commands_; 835 EditCommands edit_commands_;
823 836
824 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 837 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
825 }; 838 };
826 839
827 } // namespace content 840 } // namespace content
828 841
829 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 842 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698