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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 #elif defined(USE_AURA) | 80 #elif defined(USE_AURA) |
81 #include "chrome/browser/chrome_browser_main_aura.h" | 81 #include "chrome/browser/chrome_browser_main_aura.h" |
82 #elif defined(OS_WIN) | 82 #elif defined(OS_WIN) |
83 #include "chrome/browser/chrome_browser_main_win.h" | 83 #include "chrome/browser/chrome_browser_main_win.h" |
84 #elif defined(OS_MACOSX) | 84 #elif defined(OS_MACOSX) |
85 #include "chrome/browser/chrome_browser_main_mac.h" | 85 #include "chrome/browser/chrome_browser_main_mac.h" |
86 #elif defined(TOOLKIT_USES_GTK) | 86 #elif defined(TOOLKIT_USES_GTK) |
87 #include "chrome/browser/chrome_browser_main_gtk.h" | 87 #include "chrome/browser/chrome_browser_main_gtk.h" |
88 #endif | 88 #endif |
89 | 89 |
90 #if defined(OS_LINUX) | 90 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
91 #include "base/linux_util.h" | 91 #include "base/linux_util.h" |
92 #include "chrome/browser/crash_handler_host_linux.h" | 92 #include "chrome/browser/crash_handler_host_linux.h" |
93 #endif | 93 #endif |
94 | 94 |
95 #if defined(TOOLKIT_VIEWS) | 95 #if defined(TOOLKIT_VIEWS) |
96 #include "chrome/browser/ui/views/tab_contents/tab_contents_view_views.h" | 96 #include "chrome/browser/ui/views/tab_contents/tab_contents_view_views.h" |
97 #elif defined(TOOLKIT_USES_GTK) | 97 #elif defined(TOOLKIT_USES_GTK) |
98 #include "chrome/browser/tab_contents/tab_contents_view_gtk.h" | 98 #include "chrome/browser/tab_contents/tab_contents_view_gtk.h" |
99 #elif defined(OS_MACOSX) | 99 #elif defined(OS_MACOSX) |
100 #include "chrome/browser/tab_contents/tab_contents_view_mac.h" | 100 #include "chrome/browser/tab_contents/tab_contents_view_mac.h" |
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
925 } | 925 } |
926 | 926 |
927 FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { | 927 FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { |
928 return download_util::GetDefaultDownloadDirectory(); | 928 return download_util::GetDefaultDownloadDirectory(); |
929 } | 929 } |
930 | 930 |
931 std::string ChromeContentBrowserClient::GetDefaultDownloadName() { | 931 std::string ChromeContentBrowserClient::GetDefaultDownloadName() { |
932 return l10n_util::GetStringUTF8(IDS_DEFAULT_DOWNLOAD_FILENAME); | 932 return l10n_util::GetStringUTF8(IDS_DEFAULT_DOWNLOAD_FILENAME); |
933 } | 933 } |
934 | 934 |
935 #if defined(OS_LINUX) | 935 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
936 int ChromeContentBrowserClient::GetCrashSignalFD( | 936 int ChromeContentBrowserClient::GetCrashSignalFD( |
937 const CommandLine& command_line) { | 937 const CommandLine& command_line) { |
938 if (command_line.HasSwitch(switches::kExtensionProcess)) { | 938 if (command_line.HasSwitch(switches::kExtensionProcess)) { |
939 ExtensionCrashHandlerHostLinux* crash_handler = | 939 ExtensionCrashHandlerHostLinux* crash_handler = |
940 ExtensionCrashHandlerHostLinux::GetInstance(); | 940 ExtensionCrashHandlerHostLinux::GetInstance(); |
941 return crash_handler->GetDeathSignalSocket(); | 941 return crash_handler->GetDeathSignalSocket(); |
942 } | 942 } |
943 | 943 |
944 std::string process_type = | 944 std::string process_type = |
945 command_line.GetSwitchValueASCII(switches::kProcessType); | 945 command_line.GetSwitchValueASCII(switches::kProcessType); |
946 | 946 |
947 if (process_type == switches::kRendererProcess) | 947 if (process_type == switches::kRendererProcess) |
948 return RendererCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); | 948 return RendererCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); |
949 | 949 |
950 if (process_type == switches::kPluginProcess) | 950 if (process_type == switches::kPluginProcess) |
951 return PluginCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); | 951 return PluginCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); |
952 | 952 |
953 if (process_type == switches::kPpapiPluginProcess) | 953 if (process_type == switches::kPpapiPluginProcess) |
954 return PpapiCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); | 954 return PpapiCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); |
955 | 955 |
956 if (process_type == switches::kGpuProcess) | 956 if (process_type == switches::kGpuProcess) |
957 return GpuCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); | 957 return GpuCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); |
958 | 958 |
959 return -1; | 959 return -1; |
960 } | 960 } |
961 #endif // defined(OS_LINUX) | 961 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) |
962 | 962 |
963 #if defined(OS_WIN) | 963 #if defined(OS_WIN) |
964 const wchar_t* ChromeContentBrowserClient::GetResourceDllName() { | 964 const wchar_t* ChromeContentBrowserClient::GetResourceDllName() { |
965 return chrome::kBrowserResourcesDll; | 965 return chrome::kBrowserResourcesDll; |
966 } | 966 } |
967 #endif | 967 #endif |
968 | 968 |
969 #if defined(USE_NSS) | 969 #if defined(USE_NSS) |
970 crypto::CryptoModuleBlockingPasswordDelegate* | 970 crypto::CryptoModuleBlockingPasswordDelegate* |
971 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 971 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
972 const GURL& url) { | 972 const GURL& url) { |
973 return browser::NewCryptoModuleBlockingDialogDelegate( | 973 return browser::NewCryptoModuleBlockingDialogDelegate( |
974 browser::kCryptoModulePasswordKeygen, url.host()); | 974 browser::kCryptoModulePasswordKeygen, url.host()); |
975 } | 975 } |
976 #endif | 976 #endif |
977 | 977 |
978 } // namespace chrome | 978 } // namespace chrome |
OLD | NEW |