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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 #include "components/nacl/common/nacl_process_type.h" | 109 #include "components/nacl/common/nacl_process_type.h" |
110 #include "components/user_prefs/pref_registry_syncable.h" | 110 #include "components/user_prefs/pref_registry_syncable.h" |
111 #include "content/public/browser/browser_child_process_host.h" | 111 #include "content/public/browser/browser_child_process_host.h" |
112 #include "content/public/browser/browser_main_parts.h" | 112 #include "content/public/browser/browser_main_parts.h" |
113 #include "content/public/browser/browser_ppapi_host.h" | 113 #include "content/public/browser/browser_ppapi_host.h" |
114 #include "content/public/browser/browser_thread.h" | 114 #include "content/public/browser/browser_thread.h" |
115 #include "content/public/browser/browser_url_handler.h" | 115 #include "content/public/browser/browser_url_handler.h" |
116 #include "content/public/browser/child_process_data.h" | 116 #include "content/public/browser/child_process_data.h" |
117 #include "content/public/browser/child_process_security_policy.h" | 117 #include "content/public/browser/child_process_security_policy.h" |
118 #include "content/public/browser/compositor_util.h" | 118 #include "content/public/browser/compositor_util.h" |
| 119 #include "content/public/browser/cookie_store_factory.h" |
119 #include "content/public/browser/render_process_host.h" | 120 #include "content/public/browser/render_process_host.h" |
120 #include "content/public/browser/render_view_host.h" | 121 #include "content/public/browser/render_view_host.h" |
121 #include "content/public/browser/resource_context.h" | 122 #include "content/public/browser/resource_context.h" |
122 #include "content/public/browser/site_instance.h" | 123 #include "content/public/browser/site_instance.h" |
123 #include "content/public/browser/web_contents.h" | 124 #include "content/public/browser/web_contents.h" |
124 #include "content/public/browser/web_contents_view.h" | 125 #include "content/public/browser/web_contents_view.h" |
125 #include "content/public/common/child_process_host.h" | 126 #include "content/public/common/child_process_host.h" |
| 127 #include "content/public/common/content_constants.h" |
126 #include "content/public/common/content_descriptors.h" | 128 #include "content/public/common/content_descriptors.h" |
127 #include "extensions/browser/view_type_utils.h" | 129 #include "extensions/browser/view_type_utils.h" |
128 #include "extensions/common/constants.h" | 130 #include "extensions/common/constants.h" |
129 #include "extensions/common/switches.h" | 131 #include "extensions/common/switches.h" |
130 #include "grit/generated_resources.h" | 132 #include "grit/generated_resources.h" |
131 #include "grit/ui_resources.h" | 133 #include "grit/ui_resources.h" |
132 #include "net/base/escape.h" | 134 #include "net/base/escape.h" |
133 #include "net/base/mime_util.h" | 135 #include "net/base/mime_util.h" |
134 #include "net/cookies/canonical_cookie.h" | 136 #include "net/cookies/canonical_cookie.h" |
135 #include "net/cookies/cookie_options.h" | 137 #include "net/cookies/cookie_options.h" |
| 138 #include "net/cookies/cookie_store.h" |
136 #include "net/ssl/ssl_cert_request_info.h" | 139 #include "net/ssl/ssl_cert_request_info.h" |
137 #include "ppapi/host/ppapi_host.h" | 140 #include "ppapi/host/ppapi_host.h" |
138 #include "ui/base/l10n/l10n_util.h" | 141 #include "ui/base/l10n/l10n_util.h" |
139 #include "ui/base/resource/resource_bundle.h" | 142 #include "ui/base/resource/resource_bundle.h" |
140 #include "ui/message_center/message_center_util.h" | 143 #include "ui/message_center/message_center_util.h" |
141 #include "webkit/browser/fileapi/external_mount_points.h" | 144 #include "webkit/browser/fileapi/external_mount_points.h" |
142 #include "webkit/common/webpreferences.h" | 145 #include "webkit/common/webpreferences.h" |
143 | 146 |
144 #if defined(OS_WIN) | 147 #if defined(OS_WIN) |
145 #include "chrome/browser/chrome_browser_main_win.h" | 148 #include "chrome/browser/chrome_browser_main_win.h" |
(...skipping 1508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1654 for (i = render_views.begin(); i != render_views.end(); ++i) { | 1657 for (i = render_views.begin(); i != render_views.end(); ++i) { |
1655 BrowserThread::PostTask( | 1658 BrowserThread::PostTask( |
1656 BrowserThread::UI, FROM_HERE, | 1659 BrowserThread::UI, FROM_HERE, |
1657 base::Bind(&TabSpecificContentSettings::IndexedDBAccessed, | 1660 base::Bind(&TabSpecificContentSettings::IndexedDBAccessed, |
1658 i->first, i->second, url, name, !allow)); | 1661 i->first, i->second, url, name, !allow)); |
1659 } | 1662 } |
1660 | 1663 |
1661 return allow; | 1664 return allow; |
1662 } | 1665 } |
1663 | 1666 |
1664 net::URLRequestContext* | |
1665 ChromeContentBrowserClient::OverrideRequestContextForURL( | |
1666 const GURL& url, content::ResourceContext* context) { | |
1667 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | |
1668 if (url.SchemeIs(extensions::kExtensionScheme)) { | |
1669 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); | |
1670 return io_data->extensions_request_context(); | |
1671 } | |
1672 | |
1673 return NULL; | |
1674 } | |
1675 | |
1676 QuotaPermissionContext* | 1667 QuotaPermissionContext* |
1677 ChromeContentBrowserClient::CreateQuotaPermissionContext() { | 1668 ChromeContentBrowserClient::CreateQuotaPermissionContext() { |
1678 return new ChromeQuotaPermissionContext(); | 1669 return new ChromeQuotaPermissionContext(); |
1679 } | 1670 } |
1680 | 1671 |
1681 void ChromeContentBrowserClient::AllowCertificateError( | 1672 void ChromeContentBrowserClient::AllowCertificateError( |
1682 int render_process_id, | 1673 int render_process_id, |
1683 int render_view_id, | 1674 int render_view_id, |
1684 int cert_error, | 1675 int cert_error, |
1685 const net::SSLInfo& ssl_info, | 1676 const net::SSLInfo& ssl_info, |
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2544 #if defined(USE_NSS) | 2535 #if defined(USE_NSS) |
2545 crypto::CryptoModuleBlockingPasswordDelegate* | 2536 crypto::CryptoModuleBlockingPasswordDelegate* |
2546 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 2537 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
2547 const GURL& url) { | 2538 const GURL& url) { |
2548 return chrome::NewCryptoModuleBlockingDialogDelegate( | 2539 return chrome::NewCryptoModuleBlockingDialogDelegate( |
2549 chrome::kCryptoModulePasswordKeygen, url.host()); | 2540 chrome::kCryptoModulePasswordKeygen, url.host()); |
2550 } | 2541 } |
2551 #endif | 2542 #endif |
2552 | 2543 |
2553 } // namespace chrome | 2544 } // namespace chrome |
OLD | NEW |