diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-30 03:47:26 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-30 03:47:26 +0000 |
commit | d8f16ae0347635889c104a48269805c01901fc05 (patch) | |
tree | 1deca02651c41be9b227acf6509d0a1f2daac5b9 /chrome/browser/browser.cc | |
parent | d35d5c76b7d09200bab91116ac19ce2c40adcb18 (diff) | |
download | chromium_src-d8f16ae0347635889c104a48269805c01901fc05.zip chromium_src-d8f16ae0347635889c104a48269805c01901fc05.tar.gz chromium_src-d8f16ae0347635889c104a48269805c01901fc05.tar.bz2 |
Experiment with dislodging the Extension Shelf and having it only appear on the New Tab page.
BUG=http://crbug.com/20415
TEST=With the extension toolstrip visible, go to the New Tab page and press Ctrl + Alt + B. Watch the toolstrip merge into the New Tab page and back again into a separate toolstrip (when you press Ctrl + Alt + B again). Also, when you do this on a regular webpage (as opposed to NTP) this should toggle the toolstrip visiblity.
Review URL: http://codereview.chromium.org/175017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24864 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.cc')
-rw-r--r-- | chrome/browser/browser.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index 4acd94b..fe6474e 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -1149,6 +1149,11 @@ void Browser::ToggleBookmarkBar() { 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 @@ void Browser::RegisterUserPrefs(PrefService* prefs) { 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 @@ void Browser::ExecuteCommandWithDisposition( 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::ToolbarSizeChanged(TabContents* source, bool is_animating) { } } +void Browser::ExtensionShelfSizeChanged() { + window_->SelectedTabExtensionShelfSizeChanged(); +} + void Browser::URLStarredChanged(TabContents* source, bool starred) { if (source == GetSelectedTabContents()) window_->SetStarredState(starred); @@ -2241,6 +2252,7 @@ void Browser::InitCommandState() { 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) |