| 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 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1054 browser->window()->ShowAvatarBubbleFromAvatarButton( | 1054 browser->window()->ShowAvatarBubbleFromAvatarButton( |
| 1055 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT); | 1055 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT); |
| 1056 } | 1056 } |
| 1057 | 1057 |
| 1058 void OpenUpdateChromeDialog(Browser* browser) { | 1058 void OpenUpdateChromeDialog(Browser* browser) { |
| 1059 if (UpgradeDetector::GetInstance()->is_outdated_install()) { | 1059 if (UpgradeDetector::GetInstance()->is_outdated_install()) { |
| 1060 content::NotificationService::current()->Notify( | 1060 content::NotificationService::current()->Notify( |
| 1061 chrome::NOTIFICATION_OUTDATED_INSTALL, | 1061 chrome::NOTIFICATION_OUTDATED_INSTALL, |
| 1062 content::NotificationService::AllSources(), | 1062 content::NotificationService::AllSources(), |
| 1063 content::NotificationService::NoDetails()); | 1063 content::NotificationService::NoDetails()); |
| 1064 } else if (UpgradeDetector::GetInstance()->is_outdated_install_no_au()) { |
| 1065 content::NotificationService::current()->Notify( |
| 1066 chrome::NOTIFICATION_OUTDATED_INSTALL_NO_AU, |
| 1067 content::NotificationService::AllSources(), |
| 1068 content::NotificationService::NoDetails()); |
| 1064 } else { | 1069 } else { |
| 1065 content::RecordAction(UserMetricsAction("UpdateChrome")); | 1070 content::RecordAction(UserMetricsAction("UpdateChrome")); |
| 1066 browser->window()->ShowUpdateChromeDialog(); | 1071 browser->window()->ShowUpdateChromeDialog(); |
| 1067 } | 1072 } |
| 1068 } | 1073 } |
| 1069 | 1074 |
| 1070 void ToggleSpeechInput(Browser* browser) { | 1075 void ToggleSpeechInput(Browser* browser) { |
| 1071 WebContents* web_contents = | 1076 WebContents* web_contents = |
| 1072 browser->tab_strip_model()->GetActiveWebContents(); | 1077 browser->tab_strip_model()->GetActiveWebContents(); |
| 1073 web_contents->GetRenderViewHost()->ToggleSpeechInput(); | 1078 web_contents->GetRenderViewHost()->ToggleSpeechInput(); |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1258 Browser::TYPE_POPUP, app_name, gfx::Rect(), browser->profile(), | 1263 Browser::TYPE_POPUP, app_name, gfx::Rect(), browser->profile(), |
| 1259 browser->host_desktop_type())); | 1264 browser->host_desktop_type())); |
| 1260 app_browser->tab_strip_model()->AppendWebContents(contents, true); | 1265 app_browser->tab_strip_model()->AppendWebContents(contents, true); |
| 1261 | 1266 |
| 1262 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; | 1267 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; |
| 1263 contents->GetRenderViewHost()->SyncRendererPrefs(); | 1268 contents->GetRenderViewHost()->SyncRendererPrefs(); |
| 1264 app_browser->window()->Show(); | 1269 app_browser->window()->Show(); |
| 1265 } | 1270 } |
| 1266 | 1271 |
| 1267 } // namespace chrome | 1272 } // namespace chrome |
| OLD | NEW |