| 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" |
| 11 #include "chrome/browser/browsing_data_remover.h" | 11 #include "chrome/browser/browsing_data_remover.h" |
| 12 #include "chrome/browser/character_encoding.h" | 12 #include "chrome/browser/character_encoding.h" |
| 13 #include "chrome/browser/chrome_plugin_message_filter.h" | 13 #include "chrome/browser/chrome_plugin_message_filter.h" |
| 14 #include "chrome/browser/chrome_quota_permission_context.h" | 14 #include "chrome/browser/chrome_quota_permission_context.h" |
| 15 #include "chrome/browser/chrome_worker_message_filter.h" | 15 #include "chrome/browser/chrome_worker_message_filter.h" |
| 16 #include "chrome/browser/content_settings/host_content_settings_map.h" | 16 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 17 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 17 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 18 #include "chrome/browser/download/save_package_file_picker.h" |
| 18 #include "chrome/browser/extensions/extension_info_map.h" | 19 #include "chrome/browser/extensions/extension_info_map.h" |
| 19 #include "chrome/browser/extensions/extension_message_handler.h" | 20 #include "chrome/browser/extensions/extension_message_handler.h" |
| 20 #include "chrome/browser/extensions/extension_service.h" | 21 #include "chrome/browser/extensions/extension_service.h" |
| 21 #include "chrome/browser/extensions/extension_web_ui.h" | 22 #include "chrome/browser/extensions/extension_web_ui.h" |
| 22 #include "chrome/browser/google/google_util.h" | 23 #include "chrome/browser/google/google_util.h" |
| 23 #include "chrome/browser/notifications/desktop_notification_service.h" | 24 #include "chrome/browser/notifications/desktop_notification_service.h" |
| 24 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 25 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
| 25 #include "chrome/browser/platform_util.h" | 26 #include "chrome/browser/platform_util.h" |
| 26 #include "chrome/browser/prefs/pref_service.h" | 27 #include "chrome/browser/prefs/pref_service.h" |
| 27 #include "chrome/browser/printing/printing_message_filter.h" | 28 #include "chrome/browser/printing/printing_message_filter.h" |
| (...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 703 void ChromeContentBrowserClient::ClearCookies(RenderViewHost* rvh) { | 704 void ChromeContentBrowserClient::ClearCookies(RenderViewHost* rvh) { |
| 704 Profile* profile = rvh->site_instance()->GetProcess()->profile(); | 705 Profile* profile = rvh->site_instance()->GetProcess()->profile(); |
| 705 BrowsingDataRemover* remover = new BrowsingDataRemover(profile, | 706 BrowsingDataRemover* remover = new BrowsingDataRemover(profile, |
| 706 BrowsingDataRemover::EVERYTHING, | 707 BrowsingDataRemover::EVERYTHING, |
| 707 base::Time()); | 708 base::Time()); |
| 708 int remove_mask = BrowsingDataRemover::REMOVE_COOKIES; | 709 int remove_mask = BrowsingDataRemover::REMOVE_COOKIES; |
| 709 remover->Remove(remove_mask); | 710 remover->Remove(remove_mask); |
| 710 // BrowsingDataRemover takes care of deleting itself when done. | 711 // BrowsingDataRemover takes care of deleting itself when done. |
| 711 } | 712 } |
| 712 | 713 |
| 714 void ChromeContentBrowserClient::ChooseSavePath( |
| 715 SavePackage* save_package, |
| 716 const FilePath& suggested_path, |
| 717 bool can_save_as_complete) { |
| 718 // Deletes itself. |
| 719 new SavePackageFilePicker( |
| 720 save_package, suggested_path, can_save_as_complete); |
| 721 } |
| 722 |
| 713 #if defined(OS_LINUX) | 723 #if defined(OS_LINUX) |
| 714 int ChromeContentBrowserClient::GetCrashSignalFD( | 724 int ChromeContentBrowserClient::GetCrashSignalFD( |
| 715 const std::string& process_type) { | 725 const std::string& process_type) { |
| 716 if (process_type == switches::kRendererProcess) | 726 if (process_type == switches::kRendererProcess) |
| 717 return RendererCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); | 727 return RendererCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); |
| 718 | 728 |
| 719 if (process_type == switches::kExtensionProcess) { | 729 if (process_type == switches::kExtensionProcess) { |
| 720 ExtensionCrashHandlerHostLinux* crash_handler = | 730 ExtensionCrashHandlerHostLinux* crash_handler = |
| 721 ExtensionCrashHandlerHostLinux::GetInstance(); | 731 ExtensionCrashHandlerHostLinux::GetInstance(); |
| 722 return crash_handler->GetDeathSignalSocket(); | 732 return crash_handler->GetDeathSignalSocket(); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 738 #if defined(USE_NSS) | 748 #if defined(USE_NSS) |
| 739 crypto::CryptoModuleBlockingPasswordDelegate* | 749 crypto::CryptoModuleBlockingPasswordDelegate* |
| 740 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 750 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
| 741 const GURL& url) { | 751 const GURL& url) { |
| 742 return browser::NewCryptoModuleBlockingDialogDelegate( | 752 return browser::NewCryptoModuleBlockingDialogDelegate( |
| 743 browser::kCryptoModulePasswordKeygen, url.host()); | 753 browser::kCryptoModulePasswordKeygen, url.host()); |
| 744 } | 754 } |
| 745 #endif | 755 #endif |
| 746 | 756 |
| 747 } // namespace chrome | 757 } // namespace chrome |
| OLD | NEW |