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

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: Merged Created 4 years, 8 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/render_widget_scheduling_state.h" 30 #include "components/scheduler/renderer/render_widget_scheduling_state.h"
31 #include "components/scheduler/renderer/renderer_scheduler.h" 31 #include "components/scheduler/renderer/renderer_scheduler.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_process_launch_causes.h" 35 #include "content/common/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_features.h" 42 #include "content/public/common/content_features.h"
42 #include "content/public/common/content_switches.h" 43 #include "content/public/common/content_switches.h"
43 #include "content/public/common/context_menu_params.h" 44 #include "content/public/common/context_menu_params.h"
44 #include "content/renderer/cursor_utils.h" 45 #include "content/renderer/cursor_utils.h"
45 #include "content/renderer/devtools/render_widget_screen_metrics_emulator.h" 46 #include "content/renderer/devtools/render_widget_screen_metrics_emulator.h"
46 #include "content/renderer/external_popup_menu.h" 47 #include "content/renderer/external_popup_menu.h"
47 #include "content/renderer/gpu/compositor_output_surface.h" 48 #include "content/renderer/gpu/compositor_output_surface.h"
48 #include "content/renderer/gpu/delegated_compositor_output_surface.h" 49 #include "content/renderer/gpu/delegated_compositor_output_surface.h"
49 #include "content/renderer/gpu/frame_swap_message_queue.h" 50 #include "content/renderer/gpu/frame_swap_message_queue.h"
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after
1037 // shown. 1038 // shown.
1038 if (show_ime == ShowIme::IF_NEEDED || 1039 if (show_ime == ShowIme::IF_NEEDED ||
1039 (IsUsingImeThread() && change_source == ChangeSource::FROM_IME) || 1040 (IsUsingImeThread() && change_source == ChangeSource::FROM_IME) ||
1040 (text_input_type_ != new_type || text_input_mode_ != new_mode || 1041 (text_input_type_ != new_type || text_input_mode_ != new_mode ||
1041 text_input_info_ != new_info || 1042 text_input_info_ != new_info ||
1042 can_compose_inline_ != new_can_compose_inline) 1043 can_compose_inline_ != new_can_compose_inline)
1043 #if defined(OS_ANDROID) 1044 #if defined(OS_ANDROID)
1044 || text_field_is_dirty_ 1045 || text_field_is_dirty_
1045 #endif 1046 #endif
1046 ) { 1047 ) {
1047 ViewHostMsg_TextInputState_Params params; 1048 TextInputState params;
1048 params.type = new_type; 1049 params.type = new_type;
1049 params.mode = new_mode; 1050 params.mode = new_mode;
1050 params.flags = new_info.flags; 1051 params.flags = new_info.flags;
1051 params.value = new_info.value.utf8(); 1052 params.value = new_info.value.utf8();
1052 params.selection_start = new_info.selectionStart; 1053 params.selection_start = new_info.selectionStart;
1053 params.selection_end = new_info.selectionEnd; 1054 params.selection_end = new_info.selectionEnd;
1054 params.composition_start = new_info.compositionStart; 1055 params.composition_start = new_info.compositionStart;
1055 params.composition_end = new_info.compositionEnd; 1056 params.composition_end = new_info.compositionEnd;
1056 params.can_compose_inline = new_can_compose_inline; 1057 params.can_compose_inline = new_can_compose_inline;
1057 params.show_ime_if_needed = (show_ime == ShowIme::IF_NEEDED); 1058 params.show_ime_if_needed = (show_ime == ShowIme::IF_NEEDED);
(...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after
2148 } 2149 }
2149 2150
2150 float RenderWidget::GetOriginalDeviceScaleFactor() const { 2151 float RenderWidget::GetOriginalDeviceScaleFactor() const {
2151 return 2152 return
2152 screen_metrics_emulator_ ? 2153 screen_metrics_emulator_ ?
2153 screen_metrics_emulator_->original_screen_info().deviceScaleFactor : 2154 screen_metrics_emulator_->original_screen_info().deviceScaleFactor :
2154 device_scale_factor_; 2155 device_scale_factor_;
2155 } 2156 }
2156 2157
2157 } // namespace content 2158 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_browsertest.cc ('k') | content/test/data/textinput/page_with_input.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698