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 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1075 | 1075 |
1076 void ToggleDevToolsWindow(Browser* browser, DevToolsToggleAction action) { | 1076 void ToggleDevToolsWindow(Browser* browser, DevToolsToggleAction action) { |
1077 if (action.type() == DevToolsToggleAction::kShowConsole) | 1077 if (action.type() == DevToolsToggleAction::kShowConsole) |
1078 content::RecordAction(UserMetricsAction("DevTools_ToggleConsole")); | 1078 content::RecordAction(UserMetricsAction("DevTools_ToggleConsole")); |
1079 else | 1079 else |
1080 content::RecordAction(UserMetricsAction("DevTools_ToggleWindow")); | 1080 content::RecordAction(UserMetricsAction("DevTools_ToggleWindow")); |
1081 DevToolsWindow::ToggleDevToolsWindow(browser, action); | 1081 DevToolsWindow::ToggleDevToolsWindow(browser, action); |
1082 } | 1082 } |
1083 | 1083 |
1084 bool CanOpenTaskManager() { | 1084 bool CanOpenTaskManager() { |
1085 #if defined(ENABLE_TASK_MANAGER) | 1085 #if !defined(OS_ANDROID) |
1086 return true; | 1086 return true; |
1087 #else | 1087 #else |
1088 return false; | 1088 return false; |
1089 #endif | 1089 #endif |
1090 } | 1090 } |
1091 | 1091 |
1092 void OpenTaskManager(Browser* browser) { | 1092 void OpenTaskManager(Browser* browser) { |
1093 #if defined(ENABLE_TASK_MANAGER) | 1093 #if !defined(OS_ANDROID) |
1094 content::RecordAction(UserMetricsAction("TaskManager")); | 1094 content::RecordAction(UserMetricsAction("TaskManager")); |
1095 chrome::ShowTaskManager(browser); | 1095 chrome::ShowTaskManager(browser); |
1096 #else | 1096 #else |
1097 NOTREACHED(); | 1097 NOTREACHED(); |
1098 #endif | 1098 #endif |
1099 } | 1099 } |
1100 | 1100 |
1101 void OpenFeedbackDialog(Browser* browser) { | 1101 void OpenFeedbackDialog(Browser* browser) { |
1102 content::RecordAction(UserMetricsAction("Feedback")); | 1102 content::RecordAction(UserMetricsAction("Feedback")); |
1103 chrome::ShowFeedbackPage(browser, std::string(), std::string()); | 1103 chrome::ShowFeedbackPage(browser, std::string(), std::string()); |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1330 app_name, true /* trusted_source */, gfx::Rect(), browser->profile())); | 1330 app_name, true /* trusted_source */, gfx::Rect(), browser->profile())); |
1331 app_browser->tab_strip_model()->AppendWebContents(contents, true); | 1331 app_browser->tab_strip_model()->AppendWebContents(contents, true); |
1332 | 1332 |
1333 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; | 1333 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; |
1334 contents->GetRenderViewHost()->SyncRendererPrefs(); | 1334 contents->GetRenderViewHost()->SyncRendererPrefs(); |
1335 app_browser->window()->Show(); | 1335 app_browser->window()->Show(); |
1336 } | 1336 } |
1337 #endif // BUILDFLAG(ENABLE_EXTENSIONS) | 1337 #endif // BUILDFLAG(ENABLE_EXTENSIONS) |
1338 | 1338 |
1339 } // namespace chrome | 1339 } // namespace chrome |
OLD | NEW |