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

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

Issue 1428423002: Remove setVoiceSearchSupported part of EmbeddedSearch SearchBox API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mac fix 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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_commands.h" 5 #include "chrome/browser/ui/browser_commands.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 content::NotificationService::current()->Notify( 1124 content::NotificationService::current()->Notify(
1125 chrome::NOTIFICATION_OUTDATED_INSTALL_NO_AU, 1125 chrome::NOTIFICATION_OUTDATED_INSTALL_NO_AU,
1126 content::NotificationService::AllSources(), 1126 content::NotificationService::AllSources(),
1127 content::NotificationService::NoDetails()); 1127 content::NotificationService::NoDetails());
1128 } else { 1128 } else {
1129 content::RecordAction(UserMetricsAction("UpdateChrome")); 1129 content::RecordAction(UserMetricsAction("UpdateChrome"));
1130 browser->window()->ShowUpdateChromeDialog(); 1130 browser->window()->ShowUpdateChromeDialog();
1131 } 1131 }
1132 } 1132 }
1133 1133
1134 void ToggleSpeechInput(Browser* browser) {
1135 SearchTabHelper* search_tab_helper =
1136 SearchTabHelper::FromWebContents(
1137 browser->tab_strip_model()->GetActiveWebContents());
1138 // |search_tab_helper| can be null in unit tests.
1139 if (search_tab_helper)
1140 search_tab_helper->ToggleVoiceSearch();
1141 }
1142
1143 void DistillCurrentPage(Browser* browser) { 1134 void DistillCurrentPage(Browser* browser) {
1144 DistillCurrentPageAndView(browser->tab_strip_model()->GetActiveWebContents()); 1135 DistillCurrentPageAndView(browser->tab_strip_model()->GetActiveWebContents());
1145 } 1136 }
1146 1137
1147 bool CanRequestTabletSite(WebContents* current_tab) { 1138 bool CanRequestTabletSite(WebContents* current_tab) {
1148 return current_tab && 1139 return current_tab &&
1149 current_tab->GetController().GetLastCommittedEntry() != NULL; 1140 current_tab->GetController().GetLastCommittedEntry() != NULL;
1150 } 1141 }
1151 1142
1152 bool IsRequestingTabletSite(Browser* browser) { 1143 bool IsRequestingTabletSite(Browser* browser) {
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1329 browser->host_desktop_type())); 1320 browser->host_desktop_type()));
1330 app_browser->tab_strip_model()->AppendWebContents(contents, true); 1321 app_browser->tab_strip_model()->AppendWebContents(contents, true);
1331 1322
1332 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; 1323 contents->GetMutableRendererPrefs()->can_accept_load_drops = false;
1333 contents->GetRenderViewHost()->SyncRendererPrefs(); 1324 contents->GetRenderViewHost()->SyncRendererPrefs();
1334 app_browser->window()->Show(); 1325 app_browser->window()->Show();
1335 } 1326 }
1336 #endif // defined(ENABLE_EXTENSIONS) 1327 #endif // defined(ENABLE_EXTENSIONS)
1337 1328
1338 } // namespace chrome 1329 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_commands.h ('k') | chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698