| 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_macros.h" | 8 #include "base/metrics/histogram_macros.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1118 } | 1118 } |
| 1119 | 1119 |
| 1120 void ShowAppMenu(Browser* browser) { | 1120 void ShowAppMenu(Browser* browser) { |
| 1121 // We record the user metric for this event in AppMenu::RunMenu. | 1121 // We record the user metric for this event in AppMenu::RunMenu. |
| 1122 browser->window()->ShowAppMenu(); | 1122 browser->window()->ShowAppMenu(); |
| 1123 } | 1123 } |
| 1124 | 1124 |
| 1125 void ShowAvatarMenu(Browser* browser) { | 1125 void ShowAvatarMenu(Browser* browser) { |
| 1126 browser->window()->ShowAvatarBubbleFromAvatarButton( | 1126 browser->window()->ShowAvatarBubbleFromAvatarButton( |
| 1127 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT, signin::ManageAccountsParams(), | 1127 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT, signin::ManageAccountsParams(), |
| 1128 signin_metrics::AccessPoint::ACCESS_POINT_AVATAR_BUBBLE_SIGN_IN); | 1128 signin_metrics::AccessPoint::ACCESS_POINT_AVATAR_BUBBLE_SIGN_IN, true); |
| 1129 } | 1129 } |
| 1130 | 1130 |
| 1131 void ShowFastUserSwitcher(Browser* browser) { | 1131 void ShowFastUserSwitcher(Browser* browser) { |
| 1132 browser->window()->ShowAvatarBubbleFromAvatarButton( | 1132 browser->window()->ShowAvatarBubbleFromAvatarButton( |
| 1133 BrowserWindow::AVATAR_BUBBLE_MODE_FAST_USER_SWITCH, | 1133 BrowserWindow::AVATAR_BUBBLE_MODE_FAST_USER_SWITCH, |
| 1134 signin::ManageAccountsParams(), | 1134 signin::ManageAccountsParams(), |
| 1135 signin_metrics::AccessPoint::ACCESS_POINT_AVATAR_BUBBLE_SIGN_IN); | 1135 signin_metrics::AccessPoint::ACCESS_POINT_AVATAR_BUBBLE_SIGN_IN, false); |
| 1136 } | 1136 } |
| 1137 | 1137 |
| 1138 void OpenUpdateChromeDialog(Browser* browser) { | 1138 void OpenUpdateChromeDialog(Browser* browser) { |
| 1139 if (UpgradeDetector::GetInstance()->is_outdated_install()) { | 1139 if (UpgradeDetector::GetInstance()->is_outdated_install()) { |
| 1140 content::NotificationService::current()->Notify( | 1140 content::NotificationService::current()->Notify( |
| 1141 chrome::NOTIFICATION_OUTDATED_INSTALL, | 1141 chrome::NOTIFICATION_OUTDATED_INSTALL, |
| 1142 content::NotificationService::AllSources(), | 1142 content::NotificationService::AllSources(), |
| 1143 content::NotificationService::NoDetails()); | 1143 content::NotificationService::NoDetails()); |
| 1144 } else if (UpgradeDetector::GetInstance()->is_outdated_install_no_au()) { | 1144 } else if (UpgradeDetector::GetInstance()->is_outdated_install_no_au()) { |
| 1145 content::NotificationService::current()->Notify( | 1145 content::NotificationService::current()->Notify( |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1339 app_name, true /* trusted_source */, gfx::Rect(), browser->profile())); | 1339 app_name, true /* trusted_source */, gfx::Rect(), browser->profile())); |
| 1340 app_browser->tab_strip_model()->AppendWebContents(contents, true); | 1340 app_browser->tab_strip_model()->AppendWebContents(contents, true); |
| 1341 | 1341 |
| 1342 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; | 1342 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; |
| 1343 contents->GetRenderViewHost()->SyncRendererPrefs(); | 1343 contents->GetRenderViewHost()->SyncRendererPrefs(); |
| 1344 app_browser->window()->Show(); | 1344 app_browser->window()->Show(); |
| 1345 } | 1345 } |
| 1346 #endif // BUILDFLAG(ENABLE_EXTENSIONS) | 1346 #endif // BUILDFLAG(ENABLE_EXTENSIONS) |
| 1347 | 1347 |
| 1348 } // namespace chrome | 1348 } // namespace chrome |
| OLD | NEW |