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

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

Issue 1652483002: Browser Side Text Input State Tracking for OOPIF. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Using the Old Logic for Determining the State Change Created 4 years, 9 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
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 #include "content/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 19 matching lines...) Expand all
30 #include "components/scheduler/renderer/renderer_scheduler.h" 30 #include "components/scheduler/renderer/renderer_scheduler.h"
31 #include "content/child/npapi/webplugin.h" 31 #include "content/child/npapi/webplugin.h"
32 #include "content/common/content_switches_internal.h" 32 #include "content/common/content_switches_internal.h"
33 #include "content/common/gpu/client/context_provider_command_buffer.h" 33 #include "content/common/gpu/client/context_provider_command_buffer.h"
34 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 34 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
35 #include "content/common/gpu/gpu_process_launch_causes.h" 35 #include "content/common/gpu/gpu_process_launch_causes.h"
36 #include "content/common/input/synthetic_gesture_packet.h" 36 #include "content/common/input/synthetic_gesture_packet.h"
37 #include "content/common/input/web_input_event_traits.h" 37 #include "content/common/input/web_input_event_traits.h"
38 #include "content/common/input_messages.h" 38 #include "content/common/input_messages.h"
39 #include "content/common/swapped_out_messages.h" 39 #include "content/common/swapped_out_messages.h"
40 #include "content/common/text_input_state.h"
40 #include "content/common/view_messages.h" 41 #include "content/common/view_messages.h"
41 #include "content/public/common/content_switches.h" 42 #include "content/public/common/content_switches.h"
42 #include "content/public/common/context_menu_params.h" 43 #include "content/public/common/context_menu_params.h"
43 #include "content/renderer/cursor_utils.h" 44 #include "content/renderer/cursor_utils.h"
44 #include "content/renderer/devtools/render_widget_screen_metrics_emulator.h" 45 #include "content/renderer/devtools/render_widget_screen_metrics_emulator.h"
45 #include "content/renderer/external_popup_menu.h" 46 #include "content/renderer/external_popup_menu.h"
46 #include "content/renderer/gpu/compositor_output_surface.h" 47 #include "content/renderer/gpu/compositor_output_surface.h"
47 #include "content/renderer/gpu/delegated_compositor_output_surface.h" 48 #include "content/renderer/gpu/delegated_compositor_output_surface.h"
48 #include "content/renderer/gpu/frame_swap_message_queue.h" 49 #include "content/renderer/gpu/frame_swap_message_queue.h"
49 #include "content/renderer/gpu/mailbox_output_surface.h" 50 #include "content/renderer/gpu/mailbox_output_surface.h"
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 // shown. 1006 // shown.
1006 if (show_ime == ShowIme::IF_NEEDED || 1007 if (show_ime == ShowIme::IF_NEEDED ||
1007 (IsUsingImeThread() && change_source == ChangeSource::FROM_IME) || 1008 (IsUsingImeThread() && change_source == ChangeSource::FROM_IME) ||
1008 (text_input_type_ != new_type || text_input_mode_ != new_mode || 1009 (text_input_type_ != new_type || text_input_mode_ != new_mode ||
1009 text_input_info_ != new_info || 1010 text_input_info_ != new_info ||
1010 can_compose_inline_ != new_can_compose_inline) 1011 can_compose_inline_ != new_can_compose_inline)
1011 #if defined(OS_ANDROID) 1012 #if defined(OS_ANDROID)
1012 || text_field_is_dirty_ 1013 || text_field_is_dirty_
1013 #endif 1014 #endif
1014 ) { 1015 ) {
1015 ViewHostMsg_TextInputState_Params params; 1016 TextInputState params;
1016 params.type = new_type; 1017 params.type = new_type;
1017 params.mode = new_mode; 1018 params.mode = new_mode;
1018 params.flags = new_info.flags; 1019 params.flags = new_info.flags;
1019 params.value = new_info.value.utf8(); 1020 params.value = new_info.value.utf8();
1020 params.selection_start = new_info.selectionStart; 1021 params.selection_start = new_info.selectionStart;
1021 params.selection_end = new_info.selectionEnd; 1022 params.selection_end = new_info.selectionEnd;
1022 params.composition_start = new_info.compositionStart; 1023 params.composition_start = new_info.compositionStart;
1023 params.composition_end = new_info.compositionEnd; 1024 params.composition_end = new_info.compositionEnd;
1024 params.can_compose_inline = new_can_compose_inline; 1025 params.can_compose_inline = new_can_compose_inline;
1025 params.show_ime_if_needed = (show_ime == ShowIme::IF_NEEDED); 1026 params.show_ime_if_needed = (show_ime == ShowIme::IF_NEEDED);
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after
2124 video_hole_frames_.RemoveObserver(frame); 2125 video_hole_frames_.RemoveObserver(frame);
2125 } 2126 }
2126 #endif // defined(VIDEO_HOLE) 2127 #endif // defined(VIDEO_HOLE)
2127 2128
2128 void RenderWidget::OnWaitNextFrameForTests(int routing_id) { 2129 void RenderWidget::OnWaitNextFrameForTests(int routing_id) {
2129 QueueMessage(new ViewHostMsg_WaitForNextFrameForTests_ACK(routing_id), 2130 QueueMessage(new ViewHostMsg_WaitForNextFrameForTests_ACK(routing_id),
2130 MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE); 2131 MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE);
2131 } 2132 }
2132 2133
2133 } // namespace content 2134 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698