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

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

Issue 2466283002: [WIP Approach 2] Straighten up input method reactivation
Patch Set: 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 // This mechanism is not a drop-in replacement for IPC: messages sent this way 339 // This mechanism is not a drop-in replacement for IPC: messages sent this way
340 // will not be automatically available to BrowserMessageFilter, for example. 340 // will not be automatically available to BrowserMessageFilter, for example.
341 // FIFO ordering is preserved between messages enqueued with the same 341 // FIFO ordering is preserved between messages enqueued with the same
342 // |policy|, the ordering between messages enqueued for different policies is 342 // |policy|, the ordering between messages enqueued for different policies is
343 // undefined. 343 // undefined.
344 // 344 //
345 // |msg| message to send, ownership of |msg| is transferred. 345 // |msg| message to send, ownership of |msg| is transferred.
346 // |policy| see the comment on MessageDeliveryPolicy. 346 // |policy| see the comment on MessageDeliveryPolicy.
347 void QueueMessage(IPC::Message* msg, MessageDeliveryPolicy policy); 347 void QueueMessage(IPC::Message* msg, MessageDeliveryPolicy policy);
348 348
349 void CancelComposition();
350 void OnFocusedNodeChanged(bool is_editable, const gfx::Rect& node_bounds);
351
349 // Check whether IME thread is being used or not. 352 // Check whether IME thread is being used or not.
350 bool IsUsingImeThread(); 353 bool IsUsingImeThread();
351 354
352 // Handle start and finish of IME event guard. 355 // Handle start and finish of IME event guard.
353 void OnImeEventGuardStart(ImeEventGuard* guard); 356 void OnImeEventGuardStart(ImeEventGuard* guard);
354 void OnImeEventGuardFinish(ImeEventGuard* guard); 357 void OnImeEventGuardFinish(ImeEventGuard* guard);
355 358
356 // Returns whether we currently should handle an IME event. 359 // Returns whether we currently should handle an IME event.
357 bool ShouldHandleImeEvent(); 360 bool ShouldHandleImeEvent();
358 361
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 void OnSyntheticGestureCompleted(); 503 void OnSyntheticGestureCompleted();
501 void OnSetTextDirection(blink::WebTextDirection direction); 504 void OnSetTextDirection(blink::WebTextDirection direction);
502 void OnGetFPS(); 505 void OnGetFPS();
503 void OnUpdateScreenRects(const gfx::Rect& view_screen_rect, 506 void OnUpdateScreenRects(const gfx::Rect& view_screen_rect,
504 const gfx::Rect& window_screen_rect); 507 const gfx::Rect& window_screen_rect);
505 void OnUpdateWindowScreenRect(const gfx::Rect& window_screen_rect); 508 void OnUpdateWindowScreenRect(const gfx::Rect& window_screen_rect);
506 void OnShowImeIfNeeded(); 509 void OnShowImeIfNeeded();
507 void OnSetFrameSinkId(const cc::FrameSinkId& frame_sink_id); 510 void OnSetFrameSinkId(const cc::FrameSinkId& frame_sink_id);
508 void OnHandleCompositorProto(const std::vector<uint8_t>& proto); 511 void OnHandleCompositorProto(const std::vector<uint8_t>& proto);
509 512
513 void UpdateTextInputStateInternal(ShowIme show_ime,
514 ChangeSource change_source,
515 bool ignore_until_ack);
510 #if defined(OS_ANDROID) 516 #if defined(OS_ANDROID)
511 // Called when we send IME event that expects an ACK. 517 // Called when we send IME event that expects an ACK.
512 void OnImeEventSentForAck(const blink::WebTextInputInfo& info); 518 void OnImeEventSentForAck(const blink::WebTextInputInfo& info);
513 519
514 // Called by the browser process for every required IME acknowledgement. 520 // Called by the browser process for every required IME acknowledgement.
515 void OnImeEventAck(); 521 void OnImeEventAck();
516 522
517 // Called by the browser process to update text input state. 523 // Called by the browser process to update text input state.
518 void OnRequestTextInputStateUpdate(); 524 void OnRequestTextInputStateUpdate();
519 525
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 blink::WebDisplayMode display_mode_; 686 blink::WebDisplayMode display_mode_;
681 687
682 // It is possible that one ImeEventGuard is nested inside another 688 // It is possible that one ImeEventGuard is nested inside another
683 // ImeEventGuard. We keep track of the outermost one, and update it as needed. 689 // ImeEventGuard. We keep track of the outermost one, and update it as needed.
684 ImeEventGuard* ime_event_guard_; 690 ImeEventGuard* ime_event_guard_;
685 691
686 // Whether IME is in batch edit mode, in which case we do not update text 692 // Whether IME is in batch edit mode, in which case we do not update text
687 // input state. 693 // input state.
688 bool ime_in_batch_edit_; 694 bool ime_in_batch_edit_;
689 695
696 // Indicates that we will ignore IME related messages from host until the
697 // new text input state update is acked by the host.
698 bool ime_ignore_until_acked_;;
699
690 // True if we have requested this widget be closed. No more messages will 700 // True if we have requested this widget be closed. No more messages will
691 // be sent, except for a Close. 701 // be sent, except for a Close.
692 bool closing_; 702 bool closing_;
693 703
694 // True if it is known that the host is in the process of being shut down. 704 // True if it is known that the host is in the process of being shut down.
695 bool host_closing_; 705 bool host_closing_;
696 706
697 // Whether this RenderWidget is currently swapped out, such that the view is 707 // Whether this RenderWidget is currently swapped out, such that the view is
698 // being rendered by another process. If all RenderWidgets in a process are 708 // being rendered by another process. If all RenderWidgets in a process are
699 // swapped out, the process can exit. 709 // swapped out, the process can exit.
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 // Stores edit commands associated to the next key event. 839 // Stores edit commands associated to the next key event.
830 // Will be cleared as soon as the next key event is processed. 840 // Will be cleared as soon as the next key event is processed.
831 EditCommands edit_commands_; 841 EditCommands edit_commands_;
832 842
833 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 843 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
834 }; 844 };
835 845
836 } // namespace content 846 } // namespace content
837 847
838 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 848 #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