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

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

Issue 8372066: Revert 108268 - Revert 108214 - Try to fix a renderer crash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 4288 matching lines...) Expand 10 before | Expand all | Expand 10 after
4299 it != plugin_delegates_.end(); ++it) { 4299 it != plugin_delegates_.end(); ++it) {
4300 (*it)->ImeCompositionCompleted(text, focused_plugin_id_); 4300 (*it)->ImeCompositionCompleted(text, focused_plugin_id_);
4301 } 4301 }
4302 return; 4302 return;
4303 } 4303 }
4304 #endif 4304 #endif
4305 if (replacement_range.IsValid() && webview()) { 4305 if (replacement_range.IsValid() && webview()) {
4306 // Select the text in |replacement_range|, it will then be replaced by 4306 // Select the text in |replacement_range|, it will then be replaced by
4307 // text added by the call to RenderWidget::OnImeConfirmComposition(). 4307 // text added by the call to RenderWidget::OnImeConfirmComposition().
4308 if (WebFrame* frame = webview()->focusedFrame()) { 4308 if (WebFrame* frame = webview()->focusedFrame()) {
4309 frame->setSelectionToRange( 4309 WebRange webrange = WebRange::fromDocumentRange(
4310 WebRange::fromDocumentRange(frame, 4310 frame, replacement_range.start(), replacement_range.length());
4311 replacement_range.start(), 4311 if (!webrange.isNull())
4312 replacement_range.length())); 4312 frame->setSelectionToRange(webrange);
4313 } 4313 }
4314 } 4314 }
4315 RenderWidget::OnImeConfirmComposition(text, replacement_range); 4315 RenderWidget::OnImeConfirmComposition(text, replacement_range);
4316 } 4316 }
4317 } 4317 }
4318 4318
4319 ui::TextInputType RenderViewImpl::GetTextInputType() { 4319 ui::TextInputType RenderViewImpl::GetTextInputType() {
4320 return pepper_delegate_.IsPluginFocused() ? 4320 return pepper_delegate_.IsPluginFocused() ?
4321 pepper_delegate_.GetTextInputType() : RenderWidget::GetTextInputType(); 4321 pepper_delegate_.GetTextInputType() : RenderWidget::GetTextInputType();
4322 } 4322 }
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
4674 return webview()->settings()->useThreadedCompositor(); 4674 return webview()->settings()->useThreadedCompositor();
4675 } 4675 }
4676 4676
4677 void RenderViewImpl::OnJavaBridgeInit( 4677 void RenderViewImpl::OnJavaBridgeInit(
4678 const IPC::ChannelHandle& channel_handle) { 4678 const IPC::ChannelHandle& channel_handle) {
4679 DCHECK(!java_bridge_dispatcher_.get()); 4679 DCHECK(!java_bridge_dispatcher_.get());
4680 #if defined(ENABLE_JAVA_BRIDGE) 4680 #if defined(ENABLE_JAVA_BRIDGE)
4681 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this, channel_handle)); 4681 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this, channel_handle));
4682 #endif 4682 #endif
4683 } 4683 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698