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

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

Issue 143463006: Remove net dependency from ui/gfx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add gurl include to elide_url_unittest.cc Created 6 years, 11 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
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c449187a1c9654676449d6be11c19ccd30583397..d7fb9617f6166ae25904ea6672a0bd4bcd306015 100644
--- a/chrome/browser/ui/views/status_bubble_views.cc
+++ b/chrome/browser/ui/views/status_bubble_views.cc
@@ -12,6 +12,7 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/themes/theme_properties.h"
+#include "chrome/browser/ui/elide_url.h"
#include "net/base/net_util.h"
#include "third_party/skia/include/core/SkPaint.h"
#include "third_party/skia/include/core/SkPath.h"
@@ -722,7 +723,7 @@ void StatusBubbleViews::SetURL(const GURL& url, const std::string& languages) {
gfx::Rect popup_bounds = popup_->GetWindowBoundsInScreen();
int text_width = static_cast<int>(popup_bounds.width() -
(kShadowThickness * 2) - kTextPositionX - kTextHorizPadding - 1);
- url_text_ = gfx::ElideUrl(url, gfx::FontList(), text_width, languages);
+ url_text_ = ElideUrl(url, gfx::FontList(), text_width, languages);
// 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
@@ -886,8 +887,7 @@ void StatusBubbleViews::ExpandBubble() {
gfx::Rect popup_bounds = popup_->GetWindowBoundsInScreen();
int max_status_bubble_width = GetMaxStatusBubbleWidth();
const gfx::FontList font_list;
- url_text_ = gfx::ElideUrl(url_, font_list,
- max_status_bubble_width, languages_);
+ url_text_ = ElideUrl(url_, font_list, max_status_bubble_width, languages_);
int expanded_bubble_width =
std::max(GetStandardStatusBubbleWidth(),
std::min(gfx::GetStringWidth(url_text_, font_list) +
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698