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 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1045 browser->window()->ShowAvatarBubbleFromAvatarButton( | 1045 browser->window()->ShowAvatarBubbleFromAvatarButton( |
1046 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT); | 1046 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT); |
1047 } | 1047 } |
1048 | 1048 |
1049 void OpenUpdateChromeDialog(Browser* browser) { | 1049 void OpenUpdateChromeDialog(Browser* browser) { |
1050 if (UpgradeDetector::GetInstance()->is_outdated_install()) { | 1050 if (UpgradeDetector::GetInstance()->is_outdated_install()) { |
1051 content::NotificationService::current()->Notify( | 1051 content::NotificationService::current()->Notify( |
1052 chrome::NOTIFICATION_OUTDATED_INSTALL, | 1052 chrome::NOTIFICATION_OUTDATED_INSTALL, |
1053 content::NotificationService::AllSources(), | 1053 content::NotificationService::AllSources(), |
1054 content::NotificationService::NoDetails()); | 1054 content::NotificationService::NoDetails()); |
| 1055 } else if (UpgradeDetector::GetInstance()->is_outdated_install_no_au()) { |
| 1056 content::NotificationService::current()->Notify( |
| 1057 chrome::NOTIFICATION_OUTDATED_INSTALL_NO_AU, |
| 1058 content::NotificationService::AllSources(), |
| 1059 content::NotificationService::NoDetails()); |
1055 } else { | 1060 } else { |
1056 content::RecordAction(UserMetricsAction("UpdateChrome")); | 1061 content::RecordAction(UserMetricsAction("UpdateChrome")); |
1057 browser->window()->ShowUpdateChromeDialog(); | 1062 browser->window()->ShowUpdateChromeDialog(); |
1058 } | 1063 } |
1059 } | 1064 } |
1060 | 1065 |
1061 void ToggleSpeechInput(Browser* browser) { | 1066 void ToggleSpeechInput(Browser* browser) { |
1062 WebContents* web_contents = | 1067 WebContents* web_contents = |
1063 browser->tab_strip_model()->GetActiveWebContents(); | 1068 browser->tab_strip_model()->GetActiveWebContents(); |
1064 web_contents->GetRenderViewHost()->ToggleSpeechInput(); | 1069 web_contents->GetRenderViewHost()->ToggleSpeechInput(); |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1249 Browser::TYPE_POPUP, app_name, gfx::Rect(), browser->profile(), | 1254 Browser::TYPE_POPUP, app_name, gfx::Rect(), browser->profile(), |
1250 browser->host_desktop_type())); | 1255 browser->host_desktop_type())); |
1251 app_browser->tab_strip_model()->AppendWebContents(contents, true); | 1256 app_browser->tab_strip_model()->AppendWebContents(contents, true); |
1252 | 1257 |
1253 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; | 1258 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; |
1254 contents->GetRenderViewHost()->SyncRendererPrefs(); | 1259 contents->GetRenderViewHost()->SyncRendererPrefs(); |
1255 app_browser->window()->Show(); | 1260 app_browser->window()->Show(); |
1256 } | 1261 } |
1257 | 1262 |
1258 } // namespace chrome | 1263 } // namespace chrome |
OLD | NEW |