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 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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); |
1129 } | 1129 } |
1130 | 1130 |
1131 void ShowFastUserSwitcher(Browser* browser) { | |
1132 browser->window()->ShowAvatarBubbleFromAvatarButton( | |
1133 BrowserWindow::AVATAR_BUBBLE_MODE_FAST_USER_SWITCH, | |
sky
2017/02/21 18:30:25
Can this enum value be removed?
jlebel
2017/03/22 16:04:08
Done.
| |
1134 signin::ManageAccountsParams(), | |
1135 signin_metrics::AccessPoint::ACCESS_POINT_AVATAR_BUBBLE_SIGN_IN); | |
sky
2017/02/21 18:30:25
And this one too?
jlebel
2017/03/22 16:04:08
No, this value is used just above (when using open
| |
1136 } | |
1137 | |
1138 void OpenUpdateChromeDialog(Browser* browser) { | 1131 void OpenUpdateChromeDialog(Browser* browser) { |
1139 if (UpgradeDetector::GetInstance()->is_outdated_install()) { | 1132 if (UpgradeDetector::GetInstance()->is_outdated_install()) { |
1140 content::NotificationService::current()->Notify( | 1133 content::NotificationService::current()->Notify( |
1141 chrome::NOTIFICATION_OUTDATED_INSTALL, | 1134 chrome::NOTIFICATION_OUTDATED_INSTALL, |
1142 content::NotificationService::AllSources(), | 1135 content::NotificationService::AllSources(), |
1143 content::NotificationService::NoDetails()); | 1136 content::NotificationService::NoDetails()); |
1144 } else if (UpgradeDetector::GetInstance()->is_outdated_install_no_au()) { | 1137 } else if (UpgradeDetector::GetInstance()->is_outdated_install_no_au()) { |
1145 content::NotificationService::current()->Notify( | 1138 content::NotificationService::current()->Notify( |
1146 chrome::NOTIFICATION_OUTDATED_INSTALL_NO_AU, | 1139 chrome::NOTIFICATION_OUTDATED_INSTALL_NO_AU, |
1147 content::NotificationService::AllSources(), | 1140 content::NotificationService::AllSources(), |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1339 app_name, true /* trusted_source */, gfx::Rect(), browser->profile())); | 1332 app_name, true /* trusted_source */, gfx::Rect(), browser->profile())); |
1340 app_browser->tab_strip_model()->AppendWebContents(contents, true); | 1333 app_browser->tab_strip_model()->AppendWebContents(contents, true); |
1341 | 1334 |
1342 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; | 1335 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; |
1343 contents->GetRenderViewHost()->SyncRendererPrefs(); | 1336 contents->GetRenderViewHost()->SyncRendererPrefs(); |
1344 app_browser->window()->Show(); | 1337 app_browser->window()->Show(); |
1345 } | 1338 } |
1346 #endif // BUILDFLAG(ENABLE_EXTENSIONS) | 1339 #endif // BUILDFLAG(ENABLE_EXTENSIONS) |
1347 | 1340 |
1348 } // namespace chrome | 1341 } // namespace chrome |
OLD | NEW |