OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/app/breakpad_mac.h" | 8 #include "chrome/app/breakpad_mac.h" |
9 #include "chrome/browser/browser_about_handler.h" | 9 #include "chrome/browser/browser_about_handler.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "chrome/browser/renderer_host/chrome_render_message_filter.h" | 31 #include "chrome/browser/renderer_host/chrome_render_message_filter.h" |
32 #include "chrome/browser/renderer_host/chrome_render_view_host_observer.h" | 32 #include "chrome/browser/renderer_host/chrome_render_view_host_observer.h" |
33 #include "chrome/browser/renderer_host/text_input_client_message_filter.h" | 33 #include "chrome/browser/renderer_host/text_input_client_message_filter.h" |
34 #include "chrome/browser/search_engines/search_provider_install_state_message_fi
lter.h" | 34 #include "chrome/browser/search_engines/search_provider_install_state_message_fi
lter.h" |
35 #include "chrome/browser/spellcheck_message_filter.h" | 35 #include "chrome/browser/spellcheck_message_filter.h" |
36 #include "chrome/browser/ssl/ssl_add_cert_handler.h" | 36 #include "chrome/browser/ssl/ssl_add_cert_handler.h" |
37 #include "chrome/browser/ssl/ssl_blocking_page.h" | 37 #include "chrome/browser/ssl/ssl_blocking_page.h" |
38 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h" | 38 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h" |
39 #include "chrome/browser/tab_contents/tab_contents_ssl_helper.h" | 39 #include "chrome/browser/tab_contents/tab_contents_ssl_helper.h" |
40 #include "chrome/browser/tab_contents/tab_util.h" | 40 #include "chrome/browser/tab_contents/tab_util.h" |
| 41 #include "chrome/browser/ui/browser_list.h" |
41 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 42 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
42 #include "chrome/browser/ui/webui/chrome_web_ui_factory.h" | 43 #include "chrome/browser/ui/webui/chrome_web_ui_factory.h" |
43 #include "chrome/common/child_process_logging.h" | 44 #include "chrome/common/child_process_logging.h" |
44 #include "chrome/common/chrome_switches.h" | 45 #include "chrome/common/chrome_switches.h" |
45 #include "chrome/common/extensions/extension.h" | 46 #include "chrome/common/extensions/extension.h" |
46 #include "chrome/common/extensions/extension_messages.h" | 47 #include "chrome/common/extensions/extension_messages.h" |
47 #include "chrome/common/logging_chrome.h" | 48 #include "chrome/common/logging_chrome.h" |
48 #include "chrome/common/pref_names.h" | 49 #include "chrome/common/pref_names.h" |
49 #include "chrome/common/render_messages.h" | 50 #include "chrome/common/render_messages.h" |
50 #include "chrome/common/url_constants.h" | 51 #include "chrome/common/url_constants.h" |
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
718 | 719 |
719 void ChromeContentBrowserClient::ChooseSavePath( | 720 void ChromeContentBrowserClient::ChooseSavePath( |
720 const base::WeakPtr<SavePackage>& save_package, | 721 const base::WeakPtr<SavePackage>& save_package, |
721 const FilePath& suggested_path, | 722 const FilePath& suggested_path, |
722 bool can_save_as_complete) { | 723 bool can_save_as_complete) { |
723 // Deletes itself. | 724 // Deletes itself. |
724 new SavePackageFilePicker( | 725 new SavePackageFilePicker( |
725 save_package, suggested_path, can_save_as_complete); | 726 save_package, suggested_path, can_save_as_complete); |
726 } | 727 } |
727 | 728 |
| 729 void ChromeContentBrowserClient::EnterFullscreenMode() { |
| 730 // TODO: Not sure what the best way to get a hold of the browser here is. |
| 731 Browser* browser = BrowserList::GetLastActive(); |
| 732 browser->ToggleFullscreenMode(); |
| 733 } |
| 734 |
| 735 void ChromeContentBrowserClient::ExitFullscreenMode() { |
| 736 Browser* browser = BrowserList::GetLastActive(); |
| 737 browser->ToggleFullscreenMode(); |
| 738 } |
| 739 |
728 #if defined(OS_LINUX) | 740 #if defined(OS_LINUX) |
729 int ChromeContentBrowserClient::GetCrashSignalFD( | 741 int ChromeContentBrowserClient::GetCrashSignalFD( |
730 const std::string& process_type) { | 742 const std::string& process_type) { |
731 if (process_type == switches::kRendererProcess) | 743 if (process_type == switches::kRendererProcess) |
732 return RendererCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); | 744 return RendererCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); |
733 | 745 |
734 if (process_type == switches::kExtensionProcess) { | 746 if (process_type == switches::kExtensionProcess) { |
735 ExtensionCrashHandlerHostLinux* crash_handler = | 747 ExtensionCrashHandlerHostLinux* crash_handler = |
736 ExtensionCrashHandlerHostLinux::GetInstance(); | 748 ExtensionCrashHandlerHostLinux::GetInstance(); |
737 return crash_handler->GetDeathSignalSocket(); | 749 return crash_handler->GetDeathSignalSocket(); |
(...skipping 15 matching lines...) Expand all Loading... |
753 #if defined(USE_NSS) | 765 #if defined(USE_NSS) |
754 crypto::CryptoModuleBlockingPasswordDelegate* | 766 crypto::CryptoModuleBlockingPasswordDelegate* |
755 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 767 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
756 const GURL& url) { | 768 const GURL& url) { |
757 return browser::NewCryptoModuleBlockingDialogDelegate( | 769 return browser::NewCryptoModuleBlockingDialogDelegate( |
758 browser::kCryptoModulePasswordKeygen, url.host()); | 770 browser::kCryptoModulePasswordKeygen, url.host()); |
759 } | 771 } |
760 #endif | 772 #endif |
761 | 773 |
762 } // namespace chrome | 774 } // namespace chrome |
OLD | NEW |