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

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

Issue 23731010: Move text_elider to gfx. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update3 Created 7 years, 3 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/omnibox/omnibox_result_view.cc ('k') | chrome/browser/ui/views/tabs/tab.cc » ('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 4c290e0f04d547d0042346f9a2f6e45e33e4af7d..0fefaee7745a3552ef379e8ded1a28552e7fc630 100644
--- a/chrome/browser/ui/views/status_bubble_views.cc
+++ b/chrome/browser/ui/views/status_bubble_views.cc
@@ -21,12 +21,12 @@
#include "ui/base/animation/animation_delegate.h"
#include "ui/base/animation/linear_animation.h"
#include "ui/base/resource/resource_bundle.h"
-#include "ui/base/text/text_elider.h"
#include "ui/base/theme_provider.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/point.h"
#include "ui/gfx/screen.h"
#include "ui/gfx/skia_util.h"
+#include "ui/gfx/text_elider.h"
#include "ui/native_theme/native_theme.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/scrollbar/native_scroll_bar.h"
@@ -663,7 +663,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_ = ui::ElideUrl(url, view_->Label::font(), text_width, languages);
+ url_text_ = gfx::ElideUrl(url, view_->Label::font(), 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
@@ -820,7 +820,7 @@ void StatusBubbleViews::ExpandBubble() {
// still be too long to fit) before expanding bubble.
gfx::Rect popup_bounds = popup_->GetWindowBoundsInScreen();
int max_status_bubble_width = GetMaxStatusBubbleWidth();
- url_text_ = ui::ElideUrl(url_, view_->Label::font(),
+ url_text_ = gfx::ElideUrl(url_, view_->Label::font(),
max_status_bubble_width, languages_);
int expanded_bubble_width =std::max(GetStandardStatusBubbleWidth(),
std::min(view_->Label::font().GetStringWidth(url_text_) +
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_result_view.cc ('k') | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698