| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 #endif | 128 #endif |
| 129 | 129 |
| 130 #if defined(USE_AURA) | 130 #if defined(USE_AURA) |
| 131 #include "chrome/browser/chrome_browser_main_extra_parts_aura.h" | 131 #include "chrome/browser/chrome_browser_main_extra_parts_aura.h" |
| 132 #endif | 132 #endif |
| 133 | 133 |
| 134 #if defined(USE_ASH) | 134 #if defined(USE_ASH) |
| 135 #include "chrome/browser/chrome_browser_main_extra_parts_ash.h" | 135 #include "chrome/browser/chrome_browser_main_extra_parts_ash.h" |
| 136 #endif | 136 #endif |
| 137 | 137 |
| 138 #if defined(OS_LINUX) || defined(OS_OPENBSD) | 138 #if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(OS_ANDROID) |
| 139 #include "base/linux_util.h" | 139 #include "base/linux_util.h" |
| 140 #include "chrome/browser/crash_handler_host_linux.h" | 140 #include "chrome/browser/crash_handler_host_linuxish.h" |
| 141 #endif | 141 #endif |
| 142 | 142 |
| 143 #if defined(TOOLKIT_GTK) | 143 #if defined(TOOLKIT_GTK) |
| 144 #include "chrome/browser/tab_contents/chrome_web_contents_view_delegate_gtk.h" | 144 #include "chrome/browser/tab_contents/chrome_web_contents_view_delegate_gtk.h" |
| 145 #endif | 145 #endif |
| 146 #if defined(USE_NSS) | 146 #if defined(USE_NSS) |
| 147 #include "chrome/browser/ui/crypto_module_password_dialog.h" | 147 #include "chrome/browser/ui/crypto_module_password_dialog.h" |
| 148 #endif | 148 #endif |
| 149 | 149 |
| 150 using content::AccessTokenStore; | 150 using content::AccessTokenStore; |
| (...skipping 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1604 | 1604 |
| 1605 if (extension->HasAPIPermission(ExtensionAPIPermission::kSocket)) | 1605 if (extension->HasAPIPermission(ExtensionAPIPermission::kSocket)) |
| 1606 return true; | 1606 return true; |
| 1607 | 1607 |
| 1608 return false; | 1608 return false; |
| 1609 } | 1609 } |
| 1610 | 1610 |
| 1611 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 1611 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 1612 int ChromeContentBrowserClient::GetCrashSignalFD( | 1612 int ChromeContentBrowserClient::GetCrashSignalFD( |
| 1613 const CommandLine& command_line) { | 1613 const CommandLine& command_line) { |
| 1614 #if defined(OS_ANDROID) | |
| 1615 // TODO(carlosvaldivia): Upstream breakpad code for Android and remove this | |
| 1616 // fork. http://crbug.com/113560 | |
| 1617 NOTIMPLEMENTED(); | |
| 1618 #else | |
| 1619 if (command_line.HasSwitch(switches::kExtensionProcess)) { | 1614 if (command_line.HasSwitch(switches::kExtensionProcess)) { |
| 1620 ExtensionCrashHandlerHostLinux* crash_handler = | 1615 ExtensionCrashHandlerHostLinux* crash_handler = |
| 1621 ExtensionCrashHandlerHostLinux::GetInstance(); | 1616 ExtensionCrashHandlerHostLinux::GetInstance(); |
| 1622 return crash_handler->GetDeathSignalSocket(); | 1617 return crash_handler->GetDeathSignalSocket(); |
| 1623 } | 1618 } |
| 1624 | 1619 |
| 1625 std::string process_type = | 1620 std::string process_type = |
| 1626 command_line.GetSwitchValueASCII(switches::kProcessType); | 1621 command_line.GetSwitchValueASCII(switches::kProcessType); |
| 1627 | 1622 |
| 1628 if (process_type == switches::kRendererProcess) | 1623 if (process_type == switches::kRendererProcess) |
| 1629 return RendererCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); | 1624 return RendererCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); |
| 1630 | 1625 |
| 1631 if (process_type == switches::kPluginProcess) | 1626 if (process_type == switches::kPluginProcess) |
| 1632 return PluginCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); | 1627 return PluginCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); |
| 1633 | 1628 |
| 1634 if (process_type == switches::kPpapiPluginProcess) | 1629 if (process_type == switches::kPpapiPluginProcess) |
| 1635 return PpapiCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); | 1630 return PpapiCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); |
| 1636 | 1631 |
| 1637 if (process_type == switches::kGpuProcess) | 1632 if (process_type == switches::kGpuProcess) |
| 1638 return GpuCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); | 1633 return GpuCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); |
| 1639 #endif // defined(OS_ANDROID) | |
| 1640 | 1634 |
| 1641 return -1; | 1635 return -1; |
| 1642 } | 1636 } |
| 1643 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) | 1637 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) |
| 1644 | 1638 |
| 1645 #if defined(OS_WIN) | 1639 #if defined(OS_WIN) |
| 1646 const wchar_t* ChromeContentBrowserClient::GetResourceDllName() { | 1640 const wchar_t* ChromeContentBrowserClient::GetResourceDllName() { |
| 1647 return chrome::kBrowserResourcesDll; | 1641 return chrome::kBrowserResourcesDll; |
| 1648 } | 1642 } |
| 1649 #endif | 1643 #endif |
| 1650 | 1644 |
| 1651 #if defined(USE_NSS) | 1645 #if defined(USE_NSS) |
| 1652 crypto::CryptoModuleBlockingPasswordDelegate* | 1646 crypto::CryptoModuleBlockingPasswordDelegate* |
| 1653 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 1647 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
| 1654 const GURL& url) { | 1648 const GURL& url) { |
| 1655 return browser::NewCryptoModuleBlockingDialogDelegate( | 1649 return browser::NewCryptoModuleBlockingDialogDelegate( |
| 1656 browser::kCryptoModulePasswordKeygen, url.host()); | 1650 browser::kCryptoModulePasswordKeygen, url.host()); |
| 1657 } | 1651 } |
| 1658 #endif | 1652 #endif |
| 1659 | 1653 |
| 1660 } // namespace chrome | 1654 } // namespace chrome |
| OLD | NEW |