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

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

Issue 1914603002: Replace ViewHostMsg_TextInputState_Params with content::TextInputState. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 // shown. 1051 // shown.
1052 if (show_ime == ShowIme::IF_NEEDED || 1052 if (show_ime == ShowIme::IF_NEEDED ||
1053 (IsUsingImeThread() && change_source == ChangeSource::FROM_IME) || 1053 (IsUsingImeThread() && change_source == ChangeSource::FROM_IME) ||
1054 (text_input_type_ != new_type || text_input_mode_ != new_mode || 1054 (text_input_type_ != new_type || text_input_mode_ != new_mode ||
1055 text_input_info_ != new_info || 1055 text_input_info_ != new_info ||
1056 can_compose_inline_ != new_can_compose_inline) 1056 can_compose_inline_ != new_can_compose_inline)
1057 #if defined(OS_ANDROID) 1057 #if defined(OS_ANDROID)
1058 || text_field_is_dirty_ 1058 || text_field_is_dirty_
1059 #endif 1059 #endif
1060 ) { 1060 ) {
1061 ViewHostMsg_TextInputState_Params params; 1061 TextInputState params;
1062 params.type = new_type; 1062 params.type = new_type;
1063 params.mode = new_mode; 1063 params.mode = new_mode;
1064 params.flags = new_info.flags; 1064 params.flags = new_info.flags;
1065 params.value = new_info.value.utf8(); 1065 params.value = new_info.value.utf8();
1066 params.selection_start = new_info.selectionStart; 1066 params.selection_start = new_info.selectionStart;
1067 params.selection_end = new_info.selectionEnd; 1067 params.selection_end = new_info.selectionEnd;
1068 params.composition_start = new_info.compositionStart; 1068 params.composition_start = new_info.compositionStart;
1069 params.composition_end = new_info.compositionEnd; 1069 params.composition_end = new_info.compositionEnd;
1070 params.can_compose_inline = new_can_compose_inline; 1070 params.can_compose_inline = new_can_compose_inline;
1071 params.show_ime_if_needed = (show_ime == ShowIme::IF_NEEDED); 1071 params.show_ime_if_needed = (show_ime == ShowIme::IF_NEEDED);
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after
2110 } 2110 }
2111 2111
2112 float RenderWidget::GetOriginalDeviceScaleFactor() const { 2112 float RenderWidget::GetOriginalDeviceScaleFactor() const {
2113 return 2113 return
2114 screen_metrics_emulator_ ? 2114 screen_metrics_emulator_ ?
2115 screen_metrics_emulator_->original_screen_info().deviceScaleFactor : 2115 screen_metrics_emulator_->original_screen_info().deviceScaleFactor :
2116 device_scale_factor_; 2116 device_scale_factor_;
2117 } 2117 }
2118 2118
2119 } // namespace content 2119 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698