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

Side by Side Diff: chrome/browser/views/bookmark_bar_view.cc

Issue 1991009: Shorten several apps-related flags (Closed)
Patch Set: Created 10 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/views/bookmark_bar_view.h" 5 #include "chrome/browser/views/bookmark_bar_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 // loading, then we'll populate the bar. 456 // loading, then we'll populate the bar.
457 } 457 }
458 458
459 void BookmarkBarView::SetPageNavigator(PageNavigator* navigator) { 459 void BookmarkBarView::SetPageNavigator(PageNavigator* navigator) {
460 page_navigator_ = navigator; 460 page_navigator_ = navigator;
461 } 461 }
462 462
463 gfx::Size BookmarkBarView::GetPreferredSize() { 463 gfx::Size BookmarkBarView::GetPreferredSize() {
464 // We don't want the bookmark bar view in the app launcher new tab page. 464 // We don't want the bookmark bar view in the app launcher new tab page.
465 static bool extension_apps = CommandLine::ForCurrentProcess()->HasSwitch( 465 static bool extension_apps = CommandLine::ForCurrentProcess()->HasSwitch(
466 switches::kEnableExtensionApps); 466 switches::kEnableApps);
467 bool show_bookmark_bar = !(extension_apps && OnNewTabPage()); 467 bool show_bookmark_bar = !(extension_apps && OnNewTabPage());
468 468
469 if (show_bookmark_bar) 469 if (show_bookmark_bar)
470 return LayoutItems(true); 470 return LayoutItems(true);
471 else 471 else
472 return gfx::Size(); 472 return gfx::Size();
473 } 473 }
474 474
475 gfx::Size BookmarkBarView::GetMinimumSize() { 475 gfx::Size BookmarkBarView::GetMinimumSize() {
476 // The minimum width of the bookmark bar should at least contain the overflow 476 // The minimum width of the bookmark bar should at least contain the overflow
(...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1715 // The tooltip is the only way we have to display text explaining the error 1715 // The tooltip is the only way we have to display text explaining the error
1716 // to the user. 1716 // to the user.
1717 sync_error_button->SetTooltipText( 1717 sync_error_button->SetTooltipText(
1718 l10n_util::GetString(IDS_SYNC_BOOKMARK_BAR_ERROR_DESC)); 1718 l10n_util::GetString(IDS_SYNC_BOOKMARK_BAR_ERROR_DESC));
1719 sync_error_button->SetAccessibleName( 1719 sync_error_button->SetAccessibleName(
1720 l10n_util::GetString(IDS_ACCNAME_SYNC_ERROR_BUTTON)); 1720 l10n_util::GetString(IDS_ACCNAME_SYNC_ERROR_BUTTON));
1721 sync_error_button->SetIcon( 1721 sync_error_button->SetIcon(
1722 *ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_WARNING)); 1722 *ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_WARNING));
1723 return sync_error_button; 1723 return sync_error_button;
1724 } 1724 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698