| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/bookmarks/bookmark_editor.h" | 10 #include "chrome/browser/bookmarks/bookmark_editor.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include "chrome/browser/ui/find_bar/find_bar_controller.h" | 42 #include "chrome/browser/ui/find_bar/find_bar_controller.h" |
| 43 #include "chrome/browser/ui/find_bar/find_tab_helper.h" | 43 #include "chrome/browser/ui/find_bar/find_tab_helper.h" |
| 44 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h" | 44 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h" |
| 45 #include "chrome/browser/ui/metro_pin_tab_helper.h" | 45 #include "chrome/browser/ui/metro_pin_tab_helper.h" |
| 46 #include "chrome/browser/ui/omnibox/location_bar.h" | 46 #include "chrome/browser/ui/omnibox/location_bar.h" |
| 47 #include "chrome/browser/ui/search/search.h" | 47 #include "chrome/browser/ui/search/search.h" |
| 48 #include "chrome/browser/ui/search/search_model.h" | 48 #include "chrome/browser/ui/search/search_model.h" |
| 49 #include "chrome/browser/ui/status_bubble.h" | 49 #include "chrome/browser/ui/status_bubble.h" |
| 50 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 50 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
| 51 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 51 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 52 #include "chrome/browser/ui/webui/feedback_ui.h" | 52 #include "chrome/browser/ui/web_feedback_ui.h" |
| 53 #include "chrome/browser/ui/webui/ntp/app_launcher_handler.h" | 53 #include "chrome/browser/ui/webui/ntp/app_launcher_handler.h" |
| 54 #include "chrome/browser/web_applications/web_app.h" | 54 #include "chrome/browser/web_applications/web_app.h" |
| 55 #include "chrome/common/chrome_switches.h" | 55 #include "chrome/common/chrome_switches.h" |
| 56 #include "chrome/common/pref_names.h" | 56 #include "chrome/common/pref_names.h" |
| 57 #include "content/public/browser/devtools_agent_host_registry.h" | 57 #include "content/public/browser/devtools_agent_host_registry.h" |
| 58 #include "content/public/browser/navigation_controller.h" | 58 #include "content/public/browser/navigation_controller.h" |
| 59 #include "content/public/browser/navigation_entry.h" | 59 #include "content/public/browser/navigation_entry.h" |
| 60 #include "content/public/browser/page_navigator.h" | 60 #include "content/public/browser/page_navigator.h" |
| 61 #include "content/public/browser/render_view_host.h" | 61 #include "content/public/browser/render_view_host.h" |
| 62 #include "content/public/browser/user_metrics.h" | 62 #include "content/public/browser/user_metrics.h" |
| (...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 831 void OpenTaskManager(Browser* browser, bool highlight_background_resources) { | 831 void OpenTaskManager(Browser* browser, bool highlight_background_resources) { |
| 832 content::RecordAction(UserMetricsAction("TaskManager")); | 832 content::RecordAction(UserMetricsAction("TaskManager")); |
| 833 if (highlight_background_resources) | 833 if (highlight_background_resources) |
| 834 browser->window()->ShowBackgroundPages(); | 834 browser->window()->ShowBackgroundPages(); |
| 835 else | 835 else |
| 836 browser->window()->ShowTaskManager(); | 836 browser->window()->ShowTaskManager(); |
| 837 } | 837 } |
| 838 | 838 |
| 839 void OpenFeedbackDialog(Browser* browser) { | 839 void OpenFeedbackDialog(Browser* browser) { |
| 840 content::RecordAction(UserMetricsAction("Feedback")); | 840 content::RecordAction(UserMetricsAction("Feedback")); |
| 841 browser::ShowWebFeedbackView(browser, std::string(), std::string()); | 841 chrome::ShowFeedbackUI(browser, std::string(), std::string()); |
| 842 } | 842 } |
| 843 | 843 |
| 844 void ToggleBookmarkBar(Browser* browser) { | 844 void ToggleBookmarkBar(Browser* browser) { |
| 845 content::RecordAction(UserMetricsAction("ShowBookmarksBar")); | 845 content::RecordAction(UserMetricsAction("ShowBookmarksBar")); |
| 846 browser->window()->ToggleBookmarkBar(); | 846 browser->window()->ToggleBookmarkBar(); |
| 847 } | 847 } |
| 848 | 848 |
| 849 void ShowAppMenu(Browser* browser) { | 849 void ShowAppMenu(Browser* browser) { |
| 850 // We record the user metric for this event in WrenchMenu::RunMenu. | 850 // We record the user metric for this event in WrenchMenu::RunMenu. |
| 851 browser->window()->ShowAppMenu(); | 851 browser->window()->ShowAppMenu(); |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 989 if (!tab_contents) | 989 if (!tab_contents) |
| 990 tab_contents = new TabContents(contents); | 990 tab_contents = new TabContents(contents); |
| 991 app_browser->tab_strip_model()->AppendTabContents(tab_contents, true); | 991 app_browser->tab_strip_model()->AppendTabContents(tab_contents, true); |
| 992 | 992 |
| 993 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; | 993 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; |
| 994 contents->GetRenderViewHost()->SyncRendererPrefs(); | 994 contents->GetRenderViewHost()->SyncRendererPrefs(); |
| 995 app_browser->window()->Show(); | 995 app_browser->window()->Show(); |
| 996 } | 996 } |
| 997 | 997 |
| 998 } // namespace chrome | 998 } // namespace chrome |
| OLD | NEW |