diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-08 19:13:54 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-08 19:13:54 +0000 |
commit | 5a395b78e1c2dfaefd123d5d638ec8d16cf4356e (patch) | |
tree | 1ae0f88851886cd3a7a02cc5072a23514c2e2fe2 /content | |
parent | 3178d6a7ef4c1b1b8a86a7a2d674f774490ab3cf (diff) | |
download | chromium_src-5a395b78e1c2dfaefd123d5d638ec8d16cf4356e.zip chromium_src-5a395b78e1c2dfaefd123d5d638ec8d16cf4356e.tar.gz chromium_src-5a395b78e1c2dfaefd123d5d638ec8d16cf4356e.tar.bz2 |
content: change SetTooltipText to use string16
BUG=23581
Review URL: http://codereview.chromium.org/7583038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95852 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/renderer_host/render_widget_host.cc | 4 | ||||
-rw-r--r-- | content/browser/renderer_host/render_widget_host.h | 2 | ||||
-rw-r--r-- | content/common/view_messages.h | 2 | ||||
-rw-r--r-- | content/renderer/render_widget.cc | 3 |
4 files changed, 5 insertions, 6 deletions
diff --git a/content/browser/renderer_host/render_widget_host.cc b/content/browser/renderer_host/render_widget_host.cc index 67c9151..c22dfcf 100644 --- a/content/browser/renderer_host/render_widget_host.cc +++ b/content/browser/renderer_host/render_widget_host.cc @@ -815,7 +815,7 @@ void RenderWidgetHost::OnMsgClose() { } void RenderWidgetHost::OnMsgSetTooltipText( - const std::wstring& tooltip_text, + const string16& tooltip_text, WebTextDirection text_direction_hint) { // First, add directionality marks around tooltip text if necessary. // A naive solution would be to simply always wrap the text. However, on @@ -830,7 +830,7 @@ void RenderWidgetHost::OnMsgSetTooltipText( // trying to detect the directionality from the tooltip text rather than the // element direction. One could argue that would be a preferable solution // but we use the current approach to match Fx & IE's behavior. - string16 wrapped_tooltip_text = WideToUTF16(tooltip_text); + string16 wrapped_tooltip_text = tooltip_text; if (!tooltip_text.empty()) { if (text_direction_hint == WebKit::WebTextDirectionLeftToRight) { // Force the tooltip to have LTR directionality. diff --git a/content/browser/renderer_host/render_widget_host.h b/content/browser/renderer_host/render_widget_host.h index 947ef2b..5b938b6 100644 --- a/content/browser/renderer_host/render_widget_host.h +++ b/content/browser/renderer_host/render_widget_host.h @@ -444,7 +444,7 @@ class RenderWidgetHost : public IPC::Channel::Listener, void OnMsgRenderViewGone(int status, int error_code); void OnMsgClose(); void OnMsgRequestMove(const gfx::Rect& pos); - void OnMsgSetTooltipText(const std::wstring& tooltip_text, + void OnMsgSetTooltipText(const string16& tooltip_text, WebKit::WebTextDirection text_direction_hint); void OnMsgPaintAtSizeAck(int tag, const gfx::Size& size); void OnMsgUpdateRect(const ViewHostMsg_UpdateRect_Params& params); diff --git a/content/common/view_messages.h b/content/common/view_messages.h index 885cc03..132716d 100644 --- a/content/common/view_messages.h +++ b/content/common/view_messages.h @@ -1707,7 +1707,7 @@ IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_GetScreenInfo, // Send the tooltip text for the current mouse position to the browser. IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText, - std::wstring /* tooltip text string */, + string16 /* tooltip text string */, WebKit::WebTextDirection /* text direction hint */) // Notification that the text selection has changed. diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc index 62695f1..761a993 100644 --- a/content/renderer/render_widget.cc +++ b/content/renderer/render_widget.cc @@ -1030,8 +1030,7 @@ WebRect RenderWidget::windowRect() { void RenderWidget::setToolTipText(const WebKit::WebString& text, WebTextDirection hint) { - Send(new ViewHostMsg_SetTooltipText(routing_id_, UTF16ToWideHack(text), - hint)); + Send(new ViewHostMsg_SetTooltipText(routing_id_, text, hint)); } void RenderWidget::setWindowRect(const WebRect& pos) { |