OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/shell/browser/shell_content_browser_client.h" | 5 #include "content/shell/browser/shell_content_browser_client.h" |
6 | 6 |
7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file.h" | 9 #include "base/files/file.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 #include "content/public/browser/client_certificate_delegate.h" |
13 #include "content/public/browser/page_navigator.h" | 14 #include "content/public/browser/page_navigator.h" |
14 #include "content/public/browser/render_process_host.h" | 15 #include "content/public/browser/render_process_host.h" |
15 #include "content/public/browser/resource_dispatcher_host.h" | 16 #include "content/public/browser/resource_dispatcher_host.h" |
16 #include "content/public/browser/storage_partition.h" | 17 #include "content/public/browser/storage_partition.h" |
17 #include "content/public/common/content_switches.h" | 18 #include "content/public/common/content_switches.h" |
18 #include "content/public/common/url_constants.h" | 19 #include "content/public/common/url_constants.h" |
19 #include "content/public/common/web_preferences.h" | 20 #include "content/public/common/web_preferences.h" |
20 #include "content/shell/browser/ipc_echo_message_filter.h" | 21 #include "content/shell/browser/ipc_echo_message_filter.h" |
21 #include "content/shell/browser/layout_test/layout_test_browser_main_parts.h" | 22 #include "content/shell/browser/layout_test/layout_test_browser_main_parts.h" |
22 #include "content/shell/browser/layout_test/layout_test_resource_dispatcher_host
_delegate.h" | 23 #include "content/shell/browser/layout_test/layout_test_resource_dispatcher_host
_delegate.h" |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 #else | 281 #else |
281 return NULL; | 282 return NULL; |
282 #endif | 283 #endif |
283 } | 284 } |
284 | 285 |
285 QuotaPermissionContext* | 286 QuotaPermissionContext* |
286 ShellContentBrowserClient::CreateQuotaPermissionContext() { | 287 ShellContentBrowserClient::CreateQuotaPermissionContext() { |
287 return new ShellQuotaPermissionContext(); | 288 return new ShellQuotaPermissionContext(); |
288 } | 289 } |
289 | 290 |
| 291 void ShellContentBrowserClient::SelectClientCertificate( |
| 292 WebContents* web_contents, |
| 293 net::SSLCertRequestInfo* cert_request_info, |
| 294 scoped_ptr<ClientCertificateDelegate> delegate) { |
| 295 if (!select_client_certificate_callback_.is_null()) |
| 296 select_client_certificate_callback_.Run(); |
| 297 } |
| 298 |
290 void ShellContentBrowserClient::RequestPermission( | 299 void ShellContentBrowserClient::RequestPermission( |
291 PermissionType permission, | 300 PermissionType permission, |
292 WebContents* web_contents, | 301 WebContents* web_contents, |
293 int bridge_id, | 302 int bridge_id, |
294 const GURL& requesting_frame, | 303 const GURL& requesting_frame, |
295 bool user_gesture, | 304 bool user_gesture, |
296 const base::Callback<void(PermissionStatus)>& callback) { | 305 const base::Callback<void(PermissionStatus)>& callback) { |
297 // Some Geolocation tests on Android are still expecting to have the | 306 // Some Geolocation tests on Android are still expecting to have the |
298 // permission granted. See https://crbug.com/463514. | 307 // permission granted. See https://crbug.com/463514. |
299 if (permission == PERMISSION_GEOLOCATION) { | 308 if (permission == PERMISSION_GEOLOCATION) { |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 ShellBrowserContext* | 441 ShellBrowserContext* |
433 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( | 442 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( |
434 BrowserContext* content_browser_context) { | 443 BrowserContext* content_browser_context) { |
435 if (content_browser_context == browser_context()) | 444 if (content_browser_context == browser_context()) |
436 return browser_context(); | 445 return browser_context(); |
437 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); | 446 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); |
438 return off_the_record_browser_context(); | 447 return off_the_record_browser_context(); |
439 } | 448 } |
440 | 449 |
441 } // namespace content | 450 } // namespace content |
OLD | NEW |