OLD | NEW |
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 Loading... |
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 |
1134 void DistillCurrentPage(Browser* browser) { | 1143 void DistillCurrentPage(Browser* browser) { |
1135 DistillCurrentPageAndView(browser->tab_strip_model()->GetActiveWebContents()); | 1144 DistillCurrentPageAndView(browser->tab_strip_model()->GetActiveWebContents()); |
1136 } | 1145 } |
1137 | 1146 |
1138 bool CanRequestTabletSite(WebContents* current_tab) { | 1147 bool CanRequestTabletSite(WebContents* current_tab) { |
1139 return current_tab && | 1148 return current_tab && |
1140 current_tab->GetController().GetLastCommittedEntry() != NULL; | 1149 current_tab->GetController().GetLastCommittedEntry() != NULL; |
1141 } | 1150 } |
1142 | 1151 |
1143 bool IsRequestingTabletSite(Browser* browser) { | 1152 bool IsRequestingTabletSite(Browser* browser) { |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1320 browser->host_desktop_type())); | 1329 browser->host_desktop_type())); |
1321 app_browser->tab_strip_model()->AppendWebContents(contents, true); | 1330 app_browser->tab_strip_model()->AppendWebContents(contents, true); |
1322 | 1331 |
1323 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; | 1332 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; |
1324 contents->GetRenderViewHost()->SyncRendererPrefs(); | 1333 contents->GetRenderViewHost()->SyncRendererPrefs(); |
1325 app_browser->window()->Show(); | 1334 app_browser->window()->Show(); |
1326 } | 1335 } |
1327 #endif // defined(ENABLE_EXTENSIONS) | 1336 #endif // defined(ENABLE_EXTENSIONS) |
1328 | 1337 |
1329 } // namespace chrome | 1338 } // namespace chrome |
OLD | NEW |