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

Side by Side Diff: chrome/browser/ui/browser_command_controller.cc

Issue 1436583002: Revert of Remove setVoiceSearchSupported part of EmbeddedSearch SearchBox API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/browser_command_controller.h" 5 #include "chrome/browser/ui/browser_command_controller.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 break; 771 break;
772 case IDC_HELP_PAGE_VIA_KEYBOARD: 772 case IDC_HELP_PAGE_VIA_KEYBOARD:
773 ShowHelp(browser_, HELP_SOURCE_KEYBOARD); 773 ShowHelp(browser_, HELP_SOURCE_KEYBOARD);
774 break; 774 break;
775 case IDC_HELP_PAGE_VIA_MENU: 775 case IDC_HELP_PAGE_VIA_MENU:
776 ShowHelp(browser_, HELP_SOURCE_MENU); 776 ShowHelp(browser_, HELP_SOURCE_MENU);
777 break; 777 break;
778 case IDC_SHOW_SIGNIN: 778 case IDC_SHOW_SIGNIN:
779 ShowBrowserSigninOrSettings(browser_, signin_metrics::SOURCE_MENU); 779 ShowBrowserSigninOrSettings(browser_, signin_metrics::SOURCE_MENU);
780 break; 780 break;
781 case IDC_TOGGLE_SPEECH_INPUT:
782 ToggleSpeechInput(browser_);
783 break;
781 case IDC_DISTILL_PAGE: 784 case IDC_DISTILL_PAGE:
782 DistillCurrentPage(browser_); 785 DistillCurrentPage(browser_);
783 break; 786 break;
784 #if defined(OS_CHROMEOS) 787 #if defined(OS_CHROMEOS)
785 case IDC_TOUCH_HUD_PROJECTION_TOGGLE: 788 case IDC_TOUCH_HUD_PROJECTION_TOGGLE:
786 ash::accelerators::ToggleTouchHudProjection(); 789 ash::accelerators::ToggleTouchHudProjection();
787 break; 790 break;
788 #endif 791 #endif
789 case IDC_ROUTE_MEDIA: 792 case IDC_ROUTE_MEDIA:
790 RouteMedia(browser_); 793 RouteMedia(browser_);
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 int restart_mode = metro ? IDC_WIN_DESKTOP_RESTART : 1029 int restart_mode = metro ? IDC_WIN_DESKTOP_RESTART :
1027 (base::win::GetVersion() >= base::win::VERSION_WIN8 ? 1030 (base::win::GetVersion() >= base::win::VERSION_WIN8 ?
1028 IDC_WIN8_METRO_RESTART : IDC_WIN_CHROMEOS_RESTART); 1031 IDC_WIN8_METRO_RESTART : IDC_WIN_CHROMEOS_RESTART);
1029 command_updater_.UpdateCommandEnabled(restart_mode, normal_window); 1032 command_updater_.UpdateCommandEnabled(restart_mode, normal_window);
1030 #endif 1033 #endif
1031 1034
1032 // These are always enabled; the menu determines their menu item visibility. 1035 // These are always enabled; the menu determines their menu item visibility.
1033 command_updater_.UpdateCommandEnabled(IDC_UPGRADE_DIALOG, true); 1036 command_updater_.UpdateCommandEnabled(IDC_UPGRADE_DIALOG, true);
1034 command_updater_.UpdateCommandEnabled(IDC_VIEW_INCOMPATIBILITIES, true); 1037 command_updater_.UpdateCommandEnabled(IDC_VIEW_INCOMPATIBILITIES, true);
1035 1038
1039 // Toggle speech input
1040 command_updater_.UpdateCommandEnabled(IDC_TOGGLE_SPEECH_INPUT, true);
1041
1036 // Distill current page. 1042 // Distill current page.
1037 command_updater_.UpdateCommandEnabled( 1043 command_updater_.UpdateCommandEnabled(
1038 IDC_DISTILL_PAGE, base::CommandLine::ForCurrentProcess()->HasSwitch( 1044 IDC_DISTILL_PAGE, base::CommandLine::ForCurrentProcess()->HasSwitch(
1039 switches::kEnableDomDistiller)); 1045 switches::kEnableDomDistiller));
1040 1046
1041 // Initialize other commands whose state changes based on various conditions. 1047 // Initialize other commands whose state changes based on various conditions.
1042 UpdateCommandsForFullscreenMode(); 1048 UpdateCommandsForFullscreenMode();
1043 UpdateCommandsForContentRestrictionState(); 1049 UpdateCommandsForContentRestrictionState();
1044 UpdateCommandsForBookmarkEditing(); 1050 UpdateCommandsForBookmarkEditing();
1045 UpdateCommandsForIncognitoAvailability(); 1051 UpdateCommandsForIncognitoAvailability();
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 1382
1377 BrowserWindow* BrowserCommandController::window() { 1383 BrowserWindow* BrowserCommandController::window() {
1378 return browser_->window(); 1384 return browser_->window();
1379 } 1385 }
1380 1386
1381 Profile* BrowserCommandController::profile() { 1387 Profile* BrowserCommandController::profile() {
1382 return browser_->profile(); 1388 return browser_->profile();
1383 } 1389 }
1384 1390
1385 } // namespace chrome 1391 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/keyboard_overlay_data.js ('k') | chrome/browser/ui/browser_commands.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698