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

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

Issue 102593002: Convert string16 to base::string16 in content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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') | content/renderer/renderer_clipboard_client.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) 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 2087 matching lines...) Expand 10 before | Expand all | Expand 10 after
2098 2098
2099 void RenderWidget::OnCandidateWindowUpdated() { 2099 void RenderWidget::OnCandidateWindowUpdated() {
2100 webwidget_->didUpdateCandidateWindow(); 2100 webwidget_->didUpdateCandidateWindow();
2101 } 2101 }
2102 2102
2103 void RenderWidget::OnCandidateWindowHidden() { 2103 void RenderWidget::OnCandidateWindowHidden() {
2104 webwidget_->didHideCandidateWindow(); 2104 webwidget_->didHideCandidateWindow();
2105 } 2105 }
2106 2106
2107 void RenderWidget::OnImeSetComposition( 2107 void RenderWidget::OnImeSetComposition(
2108 const string16& text, 2108 const base::string16& text,
2109 const std::vector<WebCompositionUnderline>& underlines, 2109 const std::vector<WebCompositionUnderline>& underlines,
2110 int selection_start, int selection_end) { 2110 int selection_start, int selection_end) {
2111 if (!ShouldHandleImeEvent()) 2111 if (!ShouldHandleImeEvent())
2112 return; 2112 return;
2113 ImeEventGuard guard(this); 2113 ImeEventGuard guard(this);
2114 if (!webwidget_->setComposition( 2114 if (!webwidget_->setComposition(
2115 text, WebVector<WebCompositionUnderline>(underlines), 2115 text, WebVector<WebCompositionUnderline>(underlines),
2116 selection_start, selection_end)) { 2116 selection_start, selection_end)) {
2117 // If we failed to set the composition text, then we need to let the browser 2117 // If we failed to set the composition text, then we need to let the browser
2118 // process to cancel the input method's ongoing composition session, to make 2118 // process to cancel the input method's ongoing composition session, to make
2119 // sure we are in a consistent state. 2119 // sure we are in a consistent state.
2120 Send(new ViewHostMsg_ImeCancelComposition(routing_id())); 2120 Send(new ViewHostMsg_ImeCancelComposition(routing_id()));
2121 } 2121 }
2122 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(USE_AURA) 2122 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(USE_AURA)
2123 UpdateCompositionInfo(true); 2123 UpdateCompositionInfo(true);
2124 #endif 2124 #endif
2125 } 2125 }
2126 2126
2127 void RenderWidget::OnImeConfirmComposition(const string16& text, 2127 void RenderWidget::OnImeConfirmComposition(const base::string16& text,
2128 const gfx::Range& replacement_range, 2128 const gfx::Range& replacement_range,
2129 bool keep_selection) { 2129 bool keep_selection) {
2130 if (!ShouldHandleImeEvent()) 2130 if (!ShouldHandleImeEvent())
2131 return; 2131 return;
2132 ImeEventGuard guard(this); 2132 ImeEventGuard guard(this);
2133 handling_input_event_ = true; 2133 handling_input_event_ = true;
2134 if (text.length()) 2134 if (text.length())
2135 webwidget_->confirmComposition(text); 2135 webwidget_->confirmComposition(text);
2136 else if (keep_selection) 2136 else if (keep_selection)
2137 webwidget_->confirmComposition(WebWidget::KeepSelection); 2137 webwidget_->confirmComposition(WebWidget::KeepSelection);
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
2839 GetURLForGraphicsContext3D(), 2839 GetURLForGraphicsContext3D(),
2840 gpu_channel_host.get(), 2840 gpu_channel_host.get(),
2841 use_echo_for_swap_ack, 2841 use_echo_for_swap_ack,
2842 attributes, 2842 attributes,
2843 false /* bind generates resources */, 2843 false /* bind generates resources */,
2844 limits)); 2844 limits));
2845 return context.Pass(); 2845 return context.Pass();
2846 } 2846 }
2847 2847
2848 } // namespace content 2848 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_widget.h ('k') | content/renderer/renderer_clipboard_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698