| 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/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 #endif | 122 #endif |
| 123 | 123 |
| 124 #if defined(USE_AURA) | 124 #if defined(USE_AURA) |
| 125 #include "chrome/browser/chrome_browser_main_extra_parts_aura.h" | 125 #include "chrome/browser/chrome_browser_main_extra_parts_aura.h" |
| 126 #endif | 126 #endif |
| 127 | 127 |
| 128 #if defined(USE_ASH) | 128 #if defined(USE_ASH) |
| 129 #include "chrome/browser/chrome_browser_main_extra_parts_ash.h" | 129 #include "chrome/browser/chrome_browser_main_extra_parts_ash.h" |
| 130 #endif | 130 #endif |
| 131 | 131 |
| 132 #if defined(OS_LINUX) || defined(OS_OPENBSD) | 132 #if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(OS_ANDROID) |
| 133 #include "base/linux_util.h" | 133 #include "base/linux_util.h" |
| 134 #include "chrome/browser/crash_handler_host_linux.h" | 134 #include "chrome/browser/crash_handler_host_linuxish.h" |
| 135 #endif | 135 #endif |
| 136 | 136 |
| 137 #if defined(TOOLKIT_GTK) | 137 #if defined(TOOLKIT_GTK) |
| 138 #include "chrome/browser/tab_contents/chrome_web_contents_view_delegate_gtk.h" | 138 #include "chrome/browser/tab_contents/chrome_web_contents_view_delegate_gtk.h" |
| 139 #endif | 139 #endif |
| 140 #if defined(USE_NSS) | 140 #if defined(USE_NSS) |
| 141 #include "chrome/browser/ui/crypto_module_password_dialog.h" | 141 #include "chrome/browser/ui/crypto_module_password_dialog.h" |
| 142 #endif | 142 #endif |
| 143 | 143 |
| 144 using content::AccessTokenStore; | 144 using content::AccessTokenStore; |
| (...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1580 | 1580 |
| 1581 if (extension->HasAPIPermission(ExtensionAPIPermission::kSocket)) | 1581 if (extension->HasAPIPermission(ExtensionAPIPermission::kSocket)) |
| 1582 return true; | 1582 return true; |
| 1583 | 1583 |
| 1584 return false; | 1584 return false; |
| 1585 } | 1585 } |
| 1586 | 1586 |
| 1587 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 1587 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 1588 int ChromeContentBrowserClient::GetCrashSignalFD( | 1588 int ChromeContentBrowserClient::GetCrashSignalFD( |
| 1589 const CommandLine& command_line) { | 1589 const CommandLine& command_line) { |
| 1590 #if defined(OS_ANDROID) | |
| 1591 // TODO(carlosvaldivia): Upstream breakpad code for Android and remove this | |
| 1592 // fork. http://crbug.com/113560 | |
| 1593 NOTIMPLEMENTED(); | |
| 1594 #else | |
| 1595 if (command_line.HasSwitch(switches::kExtensionProcess)) { | 1590 if (command_line.HasSwitch(switches::kExtensionProcess)) { |
| 1596 ExtensionCrashHandlerHostLinux* crash_handler = | 1591 ExtensionCrashHandlerHostLinux* crash_handler = |
| 1597 ExtensionCrashHandlerHostLinux::GetInstance(); | 1592 ExtensionCrashHandlerHostLinux::GetInstance(); |
| 1598 return crash_handler->GetDeathSignalSocket(); | 1593 return crash_handler->GetDeathSignalSocket(); |
| 1599 } | 1594 } |
| 1600 | 1595 |
| 1601 std::string process_type = | 1596 std::string process_type = |
| 1602 command_line.GetSwitchValueASCII(switches::kProcessType); | 1597 command_line.GetSwitchValueASCII(switches::kProcessType); |
| 1603 | 1598 |
| 1604 if (process_type == switches::kRendererProcess) | 1599 if (process_type == switches::kRendererProcess) |
| 1605 return RendererCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); | 1600 return RendererCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); |
| 1606 | 1601 |
| 1607 if (process_type == switches::kPluginProcess) | 1602 if (process_type == switches::kPluginProcess) |
| 1608 return PluginCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); | 1603 return PluginCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); |
| 1609 | 1604 |
| 1610 if (process_type == switches::kPpapiPluginProcess) | 1605 if (process_type == switches::kPpapiPluginProcess) |
| 1611 return PpapiCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); | 1606 return PpapiCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); |
| 1612 | 1607 |
| 1613 if (process_type == switches::kGpuProcess) | 1608 if (process_type == switches::kGpuProcess) |
| 1614 return GpuCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); | 1609 return GpuCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); |
| 1615 #endif // defined(OS_ANDROID) | |
| 1616 | 1610 |
| 1617 return -1; | 1611 return -1; |
| 1618 } | 1612 } |
| 1619 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) | 1613 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) |
| 1620 | 1614 |
| 1621 #if defined(OS_WIN) | 1615 #if defined(OS_WIN) |
| 1622 const wchar_t* ChromeContentBrowserClient::GetResourceDllName() { | 1616 const wchar_t* ChromeContentBrowserClient::GetResourceDllName() { |
| 1623 return chrome::kBrowserResourcesDll; | 1617 return chrome::kBrowserResourcesDll; |
| 1624 } | 1618 } |
| 1625 #endif | 1619 #endif |
| 1626 | 1620 |
| 1627 #if defined(USE_NSS) | 1621 #if defined(USE_NSS) |
| 1628 crypto::CryptoModuleBlockingPasswordDelegate* | 1622 crypto::CryptoModuleBlockingPasswordDelegate* |
| 1629 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 1623 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
| 1630 const GURL& url) { | 1624 const GURL& url) { |
| 1631 return browser::NewCryptoModuleBlockingDialogDelegate( | 1625 return browser::NewCryptoModuleBlockingDialogDelegate( |
| 1632 browser::kCryptoModulePasswordKeygen, url.host()); | 1626 browser::kCryptoModulePasswordKeygen, url.host()); |
| 1633 } | 1627 } |
| 1634 #endif | 1628 #endif |
| 1635 | 1629 |
| 1636 } // namespace chrome | 1630 } // namespace chrome |
| OLD | NEW |