| 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 // We record the user metric for this event in WrenchMenu::RunMenu. | 1054 // We record the user metric for this event in WrenchMenu::RunMenu. |
| 1055 browser->window()->ShowAppMenu(); | 1055 browser->window()->ShowAppMenu(); |
| 1056 } | 1056 } |
| 1057 | 1057 |
| 1058 void ShowAvatarMenu(Browser* browser) { | 1058 void ShowAvatarMenu(Browser* browser) { |
| 1059 browser->window()->ShowAvatarBubbleFromAvatarButton( | 1059 browser->window()->ShowAvatarBubbleFromAvatarButton( |
| 1060 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT, | 1060 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT, |
| 1061 signin::ManageAccountsParams()); | 1061 signin::ManageAccountsParams()); |
| 1062 } | 1062 } |
| 1063 | 1063 |
| 1064 void ShowFastUserSwitcher(Browser* browser) { |
| 1065 browser->window()->ShowAvatarBubbleFromAvatarButton( |
| 1066 BrowserWindow::AVATAR_BUBBLE_MODE_FAST_USER_SWITCH, |
| 1067 signin::ManageAccountsParams()); |
| 1068 } |
| 1069 |
| 1064 void OpenUpdateChromeDialog(Browser* browser) { | 1070 void OpenUpdateChromeDialog(Browser* browser) { |
| 1065 if (UpgradeDetector::GetInstance()->is_outdated_install()) { | 1071 if (UpgradeDetector::GetInstance()->is_outdated_install()) { |
| 1066 content::NotificationService::current()->Notify( | 1072 content::NotificationService::current()->Notify( |
| 1067 chrome::NOTIFICATION_OUTDATED_INSTALL, | 1073 chrome::NOTIFICATION_OUTDATED_INSTALL, |
| 1068 content::NotificationService::AllSources(), | 1074 content::NotificationService::AllSources(), |
| 1069 content::NotificationService::NoDetails()); | 1075 content::NotificationService::NoDetails()); |
| 1070 } else if (UpgradeDetector::GetInstance()->is_outdated_install_no_au()) { | 1076 } else if (UpgradeDetector::GetInstance()->is_outdated_install_no_au()) { |
| 1071 content::NotificationService::current()->Notify( | 1077 content::NotificationService::current()->Notify( |
| 1072 chrome::NOTIFICATION_OUTDATED_INSTALL_NO_AU, | 1078 chrome::NOTIFICATION_OUTDATED_INSTALL_NO_AU, |
| 1073 content::NotificationService::AllSources(), | 1079 content::NotificationService::AllSources(), |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1277 browser->host_desktop_type())); | 1283 browser->host_desktop_type())); |
| 1278 app_browser->tab_strip_model()->AppendWebContents(contents, true); | 1284 app_browser->tab_strip_model()->AppendWebContents(contents, true); |
| 1279 | 1285 |
| 1280 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; | 1286 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; |
| 1281 contents->GetRenderViewHost()->SyncRendererPrefs(); | 1287 contents->GetRenderViewHost()->SyncRendererPrefs(); |
| 1282 app_browser->window()->Show(); | 1288 app_browser->window()->Show(); |
| 1283 } | 1289 } |
| 1284 #endif // defined(ENABLE_EXTENSIONS) | 1290 #endif // defined(ENABLE_EXTENSIONS) |
| 1285 | 1291 |
| 1286 } // namespace chrome | 1292 } // namespace chrome |
| OLD | NEW |