Commit 5a395b78 authored by evan@chromium.org's avatar evan@chromium.org

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
parent 3178d6a7
......@@ -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.
......
......@@ -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);
......
......@@ -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.
......
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment