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

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

Issue 1391893003: NOT FOR REVIEW: Aura on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 52115f4c1a9d49d230909513e56a7a1e9cb323c0..210833a202fddecf1fceccc5b44deede57b23b0b 100644
--- a/chrome/browser/ui/views/status_bubble_views.cc
+++ b/chrome/browser/ui/views/status_bubble_views.cc
@@ -692,10 +692,12 @@ void StatusBubbleViews::SetURL(const GURL& url, const std::string& languages) {
// Set Elided Text corresponding to the GURL object.
gfx::Rect popup_bounds = popup_->GetWindowBoundsInScreen();
+#if !defined(USE_AURA)
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);
+#endif
// 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
@@ -859,8 +861,10 @@ void StatusBubbleViews::ExpandBubble() {
gfx::Rect popup_bounds = popup_->GetWindowBoundsInScreen();
int max_status_bubble_width = GetMaxStatusBubbleWidth();
const gfx::FontList font_list;
+#if !defined(USE_AURA)
url_text_ = url_formatter::ElideUrl(url_, font_list, max_status_bubble_width,
languages_);
+#endif
int expanded_bubble_width =
std::max(GetStandardStatusBubbleWidth(),
std::min(gfx::GetStringWidth(url_text_, font_list) +

Powered by Google App Engine
This is Rietveld 408576698