| 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/metrics/user_metrics.h" | 9 #include "base/metrics/user_metrics.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1109 #if !defined(OS_ANDROID) | 1109 #if !defined(OS_ANDROID) |
| 1110 base::RecordAction(UserMetricsAction("TaskManager")); | 1110 base::RecordAction(UserMetricsAction("TaskManager")); |
| 1111 chrome::ShowTaskManager(browser); | 1111 chrome::ShowTaskManager(browser); |
| 1112 #else | 1112 #else |
| 1113 NOTREACHED(); | 1113 NOTREACHED(); |
| 1114 #endif | 1114 #endif |
| 1115 } | 1115 } |
| 1116 | 1116 |
| 1117 void OpenFeedbackDialog(Browser* browser, FeedbackSource source) { | 1117 void OpenFeedbackDialog(Browser* browser, FeedbackSource source) { |
| 1118 base::RecordAction(UserMetricsAction("Feedback")); | 1118 base::RecordAction(UserMetricsAction("Feedback")); |
| 1119 chrome::ShowFeedbackPage(browser, source, | 1119 chrome::ShowFeedbackPage( |
| 1120 std::string() /* description_template */, | 1120 browser, source, std::string() /* description_template */, |
| 1121 std::string() /* category_tag */); | 1121 std::string() /* category_tag */, std::string() /* extra_diagnostics */); |
| 1122 } | 1122 } |
| 1123 | 1123 |
| 1124 void ToggleBookmarkBar(Browser* browser) { | 1124 void ToggleBookmarkBar(Browser* browser) { |
| 1125 base::RecordAction(UserMetricsAction("ShowBookmarksBar")); | 1125 base::RecordAction(UserMetricsAction("ShowBookmarksBar")); |
| 1126 ToggleBookmarkBarWhenVisible(browser->profile()); | 1126 ToggleBookmarkBarWhenVisible(browser->profile()); |
| 1127 } | 1127 } |
| 1128 | 1128 |
| 1129 void ShowAppMenu(Browser* browser) { | 1129 void ShowAppMenu(Browser* browser) { |
| 1130 // We record the user metric for this event in AppMenu::RunMenu. | 1130 // We record the user metric for this event in AppMenu::RunMenu. |
| 1131 browser->window()->ShowAppMenu(); | 1131 browser->window()->ShowAppMenu(); |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1304 } | 1304 } |
| 1305 | 1305 |
| 1306 bool CanCreateBookmarkApp(const Browser* browser) { | 1306 bool CanCreateBookmarkApp(const Browser* browser) { |
| 1307 return extensions::TabHelper::FromWebContents( | 1307 return extensions::TabHelper::FromWebContents( |
| 1308 browser->tab_strip_model()->GetActiveWebContents()) | 1308 browser->tab_strip_model()->GetActiveWebContents()) |
| 1309 ->CanCreateBookmarkApp(); | 1309 ->CanCreateBookmarkApp(); |
| 1310 } | 1310 } |
| 1311 #endif // BUILDFLAG(ENABLE_EXTENSIONS) | 1311 #endif // BUILDFLAG(ENABLE_EXTENSIONS) |
| 1312 | 1312 |
| 1313 } // namespace chrome | 1313 } // namespace chrome |
| OLD | NEW |