diff options
Diffstat (limited to 'chrome/browser/browser.cc')
-rw-r--r-- | chrome/browser/browser.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index 4e37d4c..04524e3 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -874,6 +874,9 @@ void Browser::UpdateCommandsForFullscreenMode(bool is_fullscreen) { command_updater_.UpdateCommandEnabled(IDC_FOCUS_TOOLBAR, show_main_ui); command_updater_.UpdateCommandEnabled(IDC_FOCUS_LOCATION, show_main_ui); command_updater_.UpdateCommandEnabled(IDC_FOCUS_SEARCH, show_main_ui); + command_updater_.UpdateCommandEnabled( + IDC_FOCUS_MENU_BAR, + show_main_ui && !is_fullscreen && (type() & TYPE_POPUP) == 0); // Show various bits of UI command_updater_.UpdateCommandEnabled(IDC_DEVELOPER_MENU, show_main_ui); @@ -1322,6 +1325,12 @@ void Browser::FocusToolbar() { window_->FocusToolbar(); } +void Browser::FocusPageAndAppMenus() { + UserMetrics::RecordAction( + UserMetricsAction("FocusPageAndAppMenus"), profile_); + window_->FocusPageAndAppMenus(); +} + void Browser::FocusLocationBar() { UserMetrics::RecordAction(UserMetricsAction("FocusLocation"), profile_); window_->SetFocusToLocationBar(); @@ -1752,6 +1761,7 @@ void Browser::ExecuteCommandWithDisposition( case IDC_FOCUS_TOOLBAR: FocusToolbar(); break; case IDC_FOCUS_LOCATION: FocusLocationBar(); break; case IDC_FOCUS_SEARCH: FocusSearch(); break; + case IDC_FOCUS_MENU_BAR: FocusPageAndAppMenus(); break; // Show various bits of UI case IDC_OPEN_FILE: OpenFile(); break; |