Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(791)

Side by Side Diff: chrome/browser/ui/browser_commands.cc

Issue 10834107: chrome: Refactor the way to show the feedback ui and move it into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: chrome_pages Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/chrome_pages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 20 matching lines...) Expand all
31 #include "chrome/browser/sessions/tab_restore_service.h" 31 #include "chrome/browser/sessions/tab_restore_service.h"
32 #include "chrome/browser/sessions/tab_restore_service_delegate.h" 32 #include "chrome/browser/sessions/tab_restore_service_delegate.h"
33 #include "chrome/browser/sessions/tab_restore_service_factory.h" 33 #include "chrome/browser/sessions/tab_restore_service_factory.h"
34 #include "chrome/browser/ui/browser.h" 34 #include "chrome/browser/ui/browser.h"
35 #include "chrome/browser/ui/browser_command_controller.h" 35 #include "chrome/browser/ui/browser_command_controller.h"
36 #include "chrome/browser/ui/browser_finder.h" 36 #include "chrome/browser/ui/browser_finder.h"
37 #include "chrome/browser/ui/browser_instant_controller.h" 37 #include "chrome/browser/ui/browser_instant_controller.h"
38 #include "chrome/browser/ui/browser_tab_restore_service_delegate.h" 38 #include "chrome/browser/ui/browser_tab_restore_service_delegate.h"
39 #include "chrome/browser/ui/browser_tabstrip.h" 39 #include "chrome/browser/ui/browser_tabstrip.h"
40 #include "chrome/browser/ui/browser_window.h" 40 #include "chrome/browser/ui/browser_window.h"
41 #include "chrome/browser/ui/chrome_pages.h"
41 #include "chrome/browser/ui/constrained_window_tab_helper.h" 42 #include "chrome/browser/ui/constrained_window_tab_helper.h"
42 #include "chrome/browser/ui/find_bar/find_bar_controller.h" 43 #include "chrome/browser/ui/find_bar/find_bar_controller.h"
43 #include "chrome/browser/ui/find_bar/find_tab_helper.h" 44 #include "chrome/browser/ui/find_bar/find_tab_helper.h"
44 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h" 45 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h"
45 #include "chrome/browser/ui/metro_pin_tab_helper.h" 46 #include "chrome/browser/ui/metro_pin_tab_helper.h"
46 #include "chrome/browser/ui/omnibox/location_bar.h" 47 #include "chrome/browser/ui/omnibox/location_bar.h"
47 #include "chrome/browser/ui/search/search.h" 48 #include "chrome/browser/ui/search/search.h"
48 #include "chrome/browser/ui/search/search_model.h" 49 #include "chrome/browser/ui/search/search_model.h"
49 #include "chrome/browser/ui/status_bubble.h" 50 #include "chrome/browser/ui/status_bubble.h"
50 #include "chrome/browser/ui/tab_contents/tab_contents.h" 51 #include "chrome/browser/ui/tab_contents/tab_contents.h"
51 #include "chrome/browser/ui/tabs/tab_strip_model.h" 52 #include "chrome/browser/ui/tabs/tab_strip_model.h"
52 #include "chrome/browser/ui/webui/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
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::ShowFeedbackPage(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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/chrome_pages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698