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

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

Issue 6990072: The first step for enabling off-the-spot IME on Pepper on ChromeOS/Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed a silly mistake lacking an initialization. Created 9 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_widget.h ('k') | webkit/plugins/ppapi/mock_plugin_delegate.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after
1214 } 1214 }
1215 1215
1216 void RenderWidget::set_next_paint_is_repaint_ack() { 1216 void RenderWidget::set_next_paint_is_repaint_ack() {
1217 next_paint_flags_ |= ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK; 1217 next_paint_flags_ |= ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK;
1218 } 1218 }
1219 1219
1220 void RenderWidget::UpdateInputMethod() { 1220 void RenderWidget::UpdateInputMethod() {
1221 if (!input_method_is_active_) 1221 if (!input_method_is_active_)
1222 return; 1222 return;
1223 1223
1224 WebTextInputType new_type = WebKit::WebTextInputTypeNone; 1224 WebTextInputType new_type = GetTextInputType();
1225 WebRect new_caret_bounds; 1225 WebRect new_caret_bounds;
1226 1226
1227 if (webwidget_) { 1227 if (webwidget_)
1228 new_type = webwidget_->textInputType(); 1228 new_caret_bounds = webwidget_->caretOrSelectionBounds();
1229 new_caret_bounds = webwidget_->caretOrSelectionBounds();
1230 }
1231 1229
1232 // Only sends text input type and caret bounds to the browser process if they 1230 // Only sends text input type and caret bounds to the browser process if they
1233 // are changed. 1231 // are changed.
1234 if (text_input_type_ != new_type || caret_bounds_ != new_caret_bounds) { 1232 if (text_input_type_ != new_type || caret_bounds_ != new_caret_bounds) {
1235 text_input_type_ = new_type; 1233 text_input_type_ = new_type;
1236 caret_bounds_ = new_caret_bounds; 1234 caret_bounds_ = new_caret_bounds;
1237 Send(new ViewHostMsg_ImeUpdateTextInputState( 1235 Send(new ViewHostMsg_ImeUpdateTextInputState(
1238 routing_id(), new_type, new_caret_bounds)); 1236 routing_id(), new_type, new_caret_bounds));
1239 } 1237 }
1240 } 1238 }
1241 1239
1240 WebKit::WebTextInputType RenderWidget::GetTextInputType() {
1241 if (webwidget_)
1242 return webwidget_->textInputType();
1243 return WebKit::WebTextInputTypeNone;
1244 }
1245
1242 WebScreenInfo RenderWidget::screenInfo() { 1246 WebScreenInfo RenderWidget::screenInfo() {
1243 WebScreenInfo results; 1247 WebScreenInfo results;
1244 Send(new ViewHostMsg_GetScreenInfo(routing_id_, host_window_, &results)); 1248 Send(new ViewHostMsg_GetScreenInfo(routing_id_, host_window_, &results));
1245 return results; 1249 return results;
1246 } 1250 }
1247 1251
1248 void RenderWidget::resetInputMethod() { 1252 void RenderWidget::resetInputMethod() {
1249 if (!input_method_is_active_) 1253 if (!input_method_is_active_)
1250 return; 1254 return;
1251 1255
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 1292
1289 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { 1293 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) {
1290 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); 1294 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin();
1291 i != plugin_window_moves_.end(); ++i) { 1295 i != plugin_window_moves_.end(); ++i) {
1292 if (i->window == window) { 1296 if (i->window == window) {
1293 plugin_window_moves_.erase(i); 1297 plugin_window_moves_.erase(i);
1294 break; 1298 break;
1295 } 1299 }
1296 } 1300 }
1297 } 1301 }
OLDNEW
« no previous file with comments | « content/renderer/render_widget.h ('k') | webkit/plugins/ppapi/mock_plugin_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698