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

Unified Diff: chrome/browser/browser.cc

Issue 175017: Experiment with dislodging the Extension Shelf and having it only appear on t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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/browser.h ('k') | chrome/browser/browser_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser.cc
===================================================================
--- chrome/browser/browser.cc (revision 24842)
+++ chrome/browser/browser.cc (working copy)
@@ -1149,6 +1149,11 @@
window_->ToggleBookmarkBar();
}
+void Browser::ToggleExtensionShelf() {
+ UserMetrics::RecordAction(L"ToggleExtensionShelf", profile_);
+ window_->ToggleExtensionShelf();
+}
+
void Browser::OpenBookmarkManager() {
UserMetrics::RecordAction(L"ShowBookmarkManager", profile_);
window_->ShowBookmarkManager();
@@ -1278,6 +1283,7 @@
prefs->RegisterIntegerPref(prefs::kDeleteTimePeriod, 0);
prefs->RegisterBooleanPref(prefs::kCheckDefaultBrowser, true);
prefs->RegisterBooleanPref(prefs::kShowOmniboxSearchHint, true);
+ prefs->RegisterBooleanPref(prefs::kShowExtensionShelf, true);
}
// static
@@ -1435,6 +1441,7 @@
case IDC_REPORT_BUG: OpenBugReportDialog(); break;
case IDC_SHOW_BOOKMARK_BAR: ToggleBookmarkBar(); break;
+ case IDC_SHOW_EXTENSION_SHELF: ToggleExtensionShelf(); break;
case IDC_SHOW_BOOKMARK_MANAGER: OpenBookmarkManager(); break;
case IDC_SHOW_HISTORY: ShowHistoryTab(); break;
@@ -1910,6 +1917,10 @@
}
}
+void Browser::ExtensionShelfSizeChanged() {
+ window_->SelectedTabExtensionShelfSizeChanged();
+}
+
void Browser::URLStarredChanged(TabContents* source, bool starred) {
if (source == GetSelectedTabContents())
window_->SetStarredState(starred);
@@ -2241,6 +2252,7 @@
command_updater_.UpdateCommandEnabled(IDC_SELECT_PROFILE, true);
command_updater_.UpdateCommandEnabled(IDC_SHOW_HISTORY, true);
command_updater_.UpdateCommandEnabled(IDC_SHOW_BOOKMARK_MANAGER, true);
+ command_updater_.UpdateCommandEnabled(IDC_SHOW_EXTENSION_SHELF, true);
command_updater_.UpdateCommandEnabled(IDC_SHOW_DOWNLOADS, true);
command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE, true);
#if defined(OS_CHROMEOS)
« no previous file with comments | « chrome/browser/browser.h ('k') | chrome/browser/browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698