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

Unified Diff: chrome/browser/ui/views/status_bubble_views.cc

Issue 1841653003: Drop |languages| from {Format,Elide}Url* and IDNToUnicode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo in elide_url.cc Created 4 years, 8 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/status_bubble_views.cc
diff --git a/chrome/browser/ui/views/status_bubble_views.cc b/chrome/browser/ui/views/status_bubble_views.cc
index 826659a2f26e8282ffff0837101ae30764425c60..b1731472e45b25466f2822846ce20cb951dcabc7 100644
--- a/chrome/browser/ui/views/status_bubble_views.cc
+++ b/chrome/browser/ui/views/status_bubble_views.cc
@@ -670,9 +670,8 @@ void StatusBubbleViews::SetStatus(const base::string16& status_text) {
}
}
-void StatusBubbleViews::SetURL(const GURL& url, const std::string& languages) {
+void StatusBubbleViews::SetURL(const GURL& url) {
url_ = url;
- languages_ = languages;
if (size_.IsEmpty())
return; // We have no bounds, don't attempt to show the popup.
@@ -698,7 +697,7 @@ void StatusBubbleViews::SetURL(const GURL& url, const std::string& languages) {
int text_width = static_cast<int>(popup_bounds.width() -
(kShadowThickness * 2) - kTextPositionX - kTextHorizPadding - 1);
url_text_ =
- url_formatter::ElideUrl(url, gfx::FontList(), text_width, languages);
+ url_formatter::ElideUrl(url, gfx::FontList(), text_width);
// An URL is always treated as a left-to-right string. On right-to-left UIs
// we need to explicitly mark the URL as LTR to make sure it is displayed
@@ -714,7 +713,7 @@ void StatusBubbleViews::SetURL(const GURL& url, const std::string& languages) {
// size (shrinking or expanding). Otherwise delay.
if (is_expanded_ && !url.is_empty()) {
ExpandBubble();
- } else if (url_formatter::FormatUrl(url, languages).length() >
+ } else if (url_formatter::FormatUrl(url).length() >
url_text_.length()) {
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE, base::Bind(&StatusBubbleViews::ExpandBubble,
@@ -862,8 +861,7 @@ void StatusBubbleViews::ExpandBubble() {
gfx::Rect popup_bounds = popup_->GetWindowBoundsInScreen();
int max_status_bubble_width = GetMaxStatusBubbleWidth();
const gfx::FontList font_list;
- url_text_ = url_formatter::ElideUrl(url_, font_list, max_status_bubble_width,
- languages_);
+ url_text_ = url_formatter::ElideUrl(url_, font_list, max_status_bubble_width);
int expanded_bubble_width =
std::max(GetStandardStatusBubbleWidth(),
std::min(gfx::GetStringWidth(url_text_, font_list) +
« no previous file with comments | « chrome/browser/ui/views/status_bubble_views.h ('k') | chrome/browser/ui/views/website_settings/permissions_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698