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

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: Use front eliding 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
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 576cf1cf75b1de4cd3403d2600ba740fb12b9132..96e63d1f758bdc6f67aa63588da0398517b6b3f7 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -582,11 +582,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);
Peter Kasting 2014/02/05 00:42:49 Nit: Spaces around operators
if (site_chip_view_->visible())
available_width -= site_chip_width + kStandardSpacing;

Powered by Google App Engine
This is Rietveld 408576698