diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/cocoa/status_bubble_mac.mm | 8 | ||||
-rw-r--r-- | chrome/browser/gtk/status_bubble_gtk.cc | 4 | ||||
-rw-r--r-- | chrome/browser/message_box_handler.cc | 5 | ||||
-rw-r--r-- | chrome/browser/views/bookmark_bar_view.cc | 7 | ||||
-rw-r--r-- | chrome/browser/views/status_bubble_views.cc | 8 |
5 files changed, 15 insertions, 17 deletions
diff --git a/chrome/browser/cocoa/status_bubble_mac.mm b/chrome/browser/cocoa/status_bubble_mac.mm index 447d263..58da593 100644 --- a/chrome/browser/cocoa/status_bubble_mac.mm +++ b/chrome/browser/cocoa/status_bubble_mac.mm @@ -152,8 +152,8 @@ void StatusBubbleMac::SetURL(const GURL& url, const string16& languages) { [font pointSize]); string16 original_url_text = net::FormatUrl(url, UTF16ToUTF8(languages)); - string16 status = WideToUTF16(gfx::ElideUrl(url, font_chr, text_width, - UTF16ToWideHack(languages))); + string16 status = gfx::ElideUrl(url, font_chr, text_width, + UTF16ToWideHack(languages)); SetText(status, true); @@ -608,8 +608,8 @@ void StatusBubbleMac::ExpandBubble() { NSFont* font = [[window_ contentView] font]; gfx::Font font_chr(base::SysNSStringToWide([font fontName]), [font pointSize]); - string16 expanded_url = WideToUTF16(gfx::ElideUrl(url_, font_chr, - max_bubble_width, UTF16ToWide(languages_))); + string16 expanded_url = gfx::ElideUrl(url_, font_chr, + max_bubble_width, UTF16ToWideHack(languages_)); // Scale width from gfx::Font in view coordinates to window coordinates. int required_width_for_string = diff --git a/chrome/browser/gtk/status_bubble_gtk.cc b/chrome/browser/gtk/status_bubble_gtk.cc index bc6f9b3..e99fea0 100644 --- a/chrome/browser/gtk/status_bubble_gtk.cc +++ b/chrome/browser/gtk/status_bubble_gtk.cc @@ -106,8 +106,8 @@ void StatusBubbleGtk::SetStatusTextToURL() { // TODO(tc): We don't actually use gfx::Font as the font in the status // bubble. We should extend gfx::ElideUrl to take some sort of pango font. - url_text_ = WideToUTF8(gfx::ElideUrl(url_, gfx::Font(), desired_width, - UTF16ToWideHack(languages_))); + url_text_ = UTF16ToUTF8(gfx::ElideUrl(url_, gfx::Font(), desired_width, + UTF16ToWideHack(languages_))); SetStatusTextTo(url_text_); } diff --git a/chrome/browser/message_box_handler.cc b/chrome/browser/message_box_handler.cc index 1f5831a..c39d1b7 100644 --- a/chrome/browser/message_box_handler.cc +++ b/chrome/browser/message_box_handler.cc @@ -46,10 +46,9 @@ static std::wstring GetTitle(Profile* profile, // TODO(brettw) it should be easier than this to do the correct language // handling without getting the accept language from the profile. - string16 base_address = WideToUTF16(gfx::ElideUrl(frame_url.GetOrigin(), + string16 base_address = gfx::ElideUrl(frame_url.GetOrigin(), gfx::Font(), 0, - UTF8ToWide( - profile->GetPrefs()->GetString(prefs::kAcceptLanguages)))); + UTF8ToWide(profile->GetPrefs()->GetString(prefs::kAcceptLanguages))); // Force URL to have LTR directionality. base_address = base::i18n::GetDisplayStringInLTRDirectionality( diff --git a/chrome/browser/views/bookmark_bar_view.cc b/chrome/browser/views/bookmark_bar_view.cc index 8ce71e7..db38163 100644 --- a/chrome/browser/views/bookmark_bar_view.cc +++ b/chrome/browser/views/bookmark_bar_view.cc @@ -160,10 +160,9 @@ static std::wstring CreateToolTipForURLAndTitle(const gfx::Point& screen_loc, // "/http://www.yahoo.com" when rendered, as is, in an RTL context since // the Unicode BiDi algorithm puts certain characters on the left by // default. - std::wstring elided_url(gfx::ElideUrl(url, tt_font, max_width, languages)); - elided_url = UTF16ToWide(base::i18n::GetDisplayStringInLTRDirectionality( - WideToUTF16(elided_url))); - result.append(elided_url); + string16 elided_url(gfx::ElideUrl(url, tt_font, max_width, languages)); + elided_url = base::i18n::GetDisplayStringInLTRDirectionality(elided_url); + result.append(UTF16ToWideHack(elided_url)); } return result; } diff --git a/chrome/browser/views/status_bubble_views.cc b/chrome/browser/views/status_bubble_views.cc index 2f92daf..234b6f0 100644 --- a/chrome/browser/views/status_bubble_views.cc +++ b/chrome/browser/views/status_bubble_views.cc @@ -646,8 +646,8 @@ void StatusBubbleViews::SetURL(const GURL& url, const string16& languages) { popup_->GetBounds(&popup_bounds, true); int text_width = static_cast<int>(popup_bounds.width() - (kShadowThickness * 2) - kTextPositionX - kTextHorizPadding - 1); - url_text_ = WideToUTF16(gfx::ElideUrl(url, view_->Label::font(), - text_width, UTF16ToWide(languages))); + url_text_ = gfx::ElideUrl(url, view_->Label::font(), + text_width, UTF16ToWideHack(languages)); std::wstring original_url_text = UTF16ToWideHack(net::FormatUrl(url, UTF16ToUTF8(languages))); @@ -801,8 +801,8 @@ void StatusBubbleViews::ExpandBubble() { gfx::Rect popup_bounds; popup_->GetBounds(&popup_bounds, true); int max_status_bubble_width = GetMaxStatusBubbleWidth(); - url_text_ = WideToUTF16(gfx::ElideUrl(url_, view_->Label::font(), - max_status_bubble_width, UTF16ToWideHack(languages_))); + url_text_ = gfx::ElideUrl(url_, view_->Label::font(), + max_status_bubble_width, UTF16ToWideHack(languages_)); int expanded_bubble_width =std::max(GetStandardStatusBubbleWidth(), std::min(view_->Label::font().GetStringWidth(UTF16ToWide(url_text_)) + (kShadowThickness * 2) + kTextPositionX + |