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

Unified Diff: chrome/browser/ui/views/toolbar/toolbar_view.cc

Issue 141333004: [SiteChip] Remove 50% width cap for site chip (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 10 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/toolbar/site_chip_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/toolbar/toolbar_view.cc
diff --git a/chrome/browser/ui/views/toolbar/toolbar_view.cc b/chrome/browser/ui/views/toolbar/toolbar_view.cc
index 84fb1ed1712d146c3ac56179d961c5f9c8c12291..d663389e1ccdc67ef9118196e4ae2737d905cebb 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -587,11 +587,8 @@ void ToolbarView::Layout() {
int available_width = std::max(0, width() - kRightEdgeSpacing -
app_menu_width - browser_actions_width - next_element_x);
- // Cap site chip width at 1/2 the size available to the location bar.
site_chip_view_->SetVisible(site_chip_view_->ShouldShow());
- int site_chip_width = site_chip_view_->GetPreferredSize().width();
- site_chip_width = std::max(0, std::min(site_chip_width,
- (available_width - kStandardSpacing) / 2));
+ int site_chip_width = site_chip_view_->ElideDomainTarget(available_width/2);
if (site_chip_view_->visible())
available_width -= site_chip_width + kStandardSpacing;
« no previous file with comments | « chrome/browser/ui/views/toolbar/site_chip_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698