| 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 18 matching lines...) Expand all Loading... |
| 29 #include "chrome/browser/sessions/tab_restore_service_factory.h" | 29 #include "chrome/browser/sessions/tab_restore_service_factory.h" |
| 30 #include "chrome/browser/ui/browser.h" | 30 #include "chrome/browser/ui/browser.h" |
| 31 #include "chrome/browser/ui/browser_command_controller.h" | 31 #include "chrome/browser/ui/browser_command_controller.h" |
| 32 #include "chrome/browser/ui/browser_finder.h" | 32 #include "chrome/browser/ui/browser_finder.h" |
| 33 #include "chrome/browser/ui/browser_tab_restore_service_delegate.h" | 33 #include "chrome/browser/ui/browser_tab_restore_service_delegate.h" |
| 34 #include "chrome/browser/ui/browser_tabstrip.h" | 34 #include "chrome/browser/ui/browser_tabstrip.h" |
| 35 #include "chrome/browser/ui/browser_window.h" | 35 #include "chrome/browser/ui/browser_window.h" |
| 36 #include "chrome/browser/ui/constrained_window_tab_helper.h" | 36 #include "chrome/browser/ui/constrained_window_tab_helper.h" |
| 37 #include "chrome/browser/ui/find_bar/find_bar_controller.h" | 37 #include "chrome/browser/ui/find_bar/find_bar_controller.h" |
| 38 #include "chrome/browser/ui/find_bar/find_tab_helper.h" | 38 #include "chrome/browser/ui/find_bar/find_tab_helper.h" |
| 39 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h" |
| 39 #include "chrome/browser/ui/omnibox/location_bar.h" | 40 #include "chrome/browser/ui/omnibox/location_bar.h" |
| 40 #include "chrome/browser/ui/search/search.h" | 41 #include "chrome/browser/ui/search/search.h" |
| 41 #include "chrome/browser/ui/search/search_model.h" | 42 #include "chrome/browser/ui/search/search_model.h" |
| 42 #include "chrome/browser/ui/status_bubble.h" | 43 #include "chrome/browser/ui/status_bubble.h" |
| 43 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 44 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
| 44 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 45 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 45 #include "chrome/browser/ui/webui/feedback_ui.h" | 46 #include "chrome/browser/ui/webui/feedback_ui.h" |
| 46 #include "chrome/browser/ui/webui/ntp/app_launcher_handler.h" | 47 #include "chrome/browser/ui/webui/ntp/app_launcher_handler.h" |
| 47 #include "chrome/browser/web_applications/web_app.h" | 48 #include "chrome/browser/web_applications/web_app.h" |
| 48 #include "chrome/common/chrome_switches.h" | 49 #include "chrome/common/chrome_switches.h" |
| (...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 836 | 837 |
| 837 void OpenUpdateChromeDialog(Browser* browser) { | 838 void OpenUpdateChromeDialog(Browser* browser) { |
| 838 content::RecordAction(UserMetricsAction("UpdateChrome")); | 839 content::RecordAction(UserMetricsAction("UpdateChrome")); |
| 839 browser->window()->ShowUpdateChromeDialog(); | 840 browser->window()->ShowUpdateChromeDialog(); |
| 840 } | 841 } |
| 841 | 842 |
| 842 void ToggleSpeechInput(Browser* browser) { | 843 void ToggleSpeechInput(Browser* browser) { |
| 843 GetActiveWebContents(browser)->GetRenderViewHost()->ToggleSpeechInput(); | 844 GetActiveWebContents(browser)->GetRenderViewHost()->ToggleSpeechInput(); |
| 844 } | 845 } |
| 845 | 846 |
| 847 void ToggleFullscreenMode(Browser* browser) { |
| 848 browser->fullscreen_controller()->ToggleFullscreenMode(); |
| 849 } |
| 850 |
| 846 void ViewSource(Browser* browser, TabContents* contents) { | 851 void ViewSource(Browser* browser, TabContents* contents) { |
| 847 DCHECK(contents); | 852 DCHECK(contents); |
| 848 | 853 |
| 849 NavigationEntry* active_entry = | 854 NavigationEntry* active_entry = |
| 850 contents->web_contents()->GetController().GetActiveEntry(); | 855 contents->web_contents()->GetController().GetActiveEntry(); |
| 851 if (!active_entry) | 856 if (!active_entry) |
| 852 return; | 857 return; |
| 853 | 858 |
| 854 ViewSource(browser, contents, active_entry->GetURL(), | 859 ViewSource(browser, contents, active_entry->GetURL(), |
| 855 active_entry->GetContentState()); | 860 active_entry->GetContentState()); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 942 if (!tab_contents) | 947 if (!tab_contents) |
| 943 tab_contents = new TabContents(contents); | 948 tab_contents = new TabContents(contents); |
| 944 app_browser->tab_strip_model()->AppendTabContents(tab_contents, true); | 949 app_browser->tab_strip_model()->AppendTabContents(tab_contents, true); |
| 945 | 950 |
| 946 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; | 951 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; |
| 947 contents->GetRenderViewHost()->SyncRendererPrefs(); | 952 contents->GetRenderViewHost()->SyncRendererPrefs(); |
| 948 app_browser->window()->Show(); | 953 app_browser->window()->Show(); |
| 949 } | 954 } |
| 950 | 955 |
| 951 } // namespace chrome | 956 } // namespace chrome |
| OLD | NEW |