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 #ifndef CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/callback_forward.h" | 13 #include "base/callback_forward.h" |
14 #include "base/memory/linked_ptr.h" | 14 #include "base/memory/linked_ptr.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "base/memory/scoped_vector.h" | 16 #include "base/memory/scoped_vector.h" |
17 #include "base/values.h" | 17 #include "base/values.h" |
18 #include "content/public/browser/certificate_request_result_type.h" | 18 #include "content/public/browser/certificate_request_result_type.h" |
19 #include "content/public/browser/navigation_throttle.h" | 19 #include "content/public/browser/navigation_throttle.h" |
| 20 #include "content/public/browser/resource_request_info.h" |
20 #include "content/public/common/content_client.h" | 21 #include "content/public/common/content_client.h" |
21 #include "content/public/common/media_stream_request.h" | 22 #include "content/public/common/media_stream_request.h" |
22 #include "content/public/common/resource_type.h" | 23 #include "content/public/common/resource_type.h" |
23 #include "content/public/common/socket_permission_request.h" | 24 #include "content/public/common/socket_permission_request.h" |
24 #include "content/public/common/window_container_type.h" | 25 #include "content/public/common/window_container_type.h" |
25 #include "net/base/mime_util.h" | 26 #include "net/base/mime_util.h" |
26 #include "net/cookies/canonical_cookie.h" | 27 #include "net/cookies/canonical_cookie.h" |
27 #include "net/url_request/url_request_interceptor.h" | 28 #include "net/url_request/url_request_interceptor.h" |
28 #include "net/url_request/url_request_job_factory.h" | 29 #include "net/url_request/url_request_job_factory.h" |
29 #include "storage/browser/fileapi/file_system_context.h" | 30 #include "storage/browser/fileapi/file_system_context.h" |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 // temporary storage. | 458 // temporary storage. |
458 virtual scoped_ptr<storage::QuotaEvictionPolicy> | 459 virtual scoped_ptr<storage::QuotaEvictionPolicy> |
459 GetTemporaryStorageEvictionPolicy(BrowserContext* context); | 460 GetTemporaryStorageEvictionPolicy(BrowserContext* context); |
460 | 461 |
461 // Informs the embedder that a certificate error has occured. If | 462 // Informs the embedder that a certificate error has occured. If |
462 // |overridable| is true and if |strict_enforcement| is false, the user | 463 // |overridable| is true and if |strict_enforcement| is false, the user |
463 // can ignore the error and continue. The embedder can call the callback | 464 // can ignore the error and continue. The embedder can call the callback |
464 // asynchronously. If |result| is not set to | 465 // asynchronously. If |result| is not set to |
465 // CERTIFICATE_REQUEST_RESULT_TYPE_CONTINUE, the request will be cancelled | 466 // CERTIFICATE_REQUEST_RESULT_TYPE_CONTINUE, the request will be cancelled |
466 // or denied immediately, and the callback won't be run. | 467 // or denied immediately, and the callback won't be run. |
467 virtual void AllowCertificateError(int render_process_id, | 468 virtual void AllowCertificateError( |
468 int render_frame_id, | 469 const ResourceRequestInfo::WebContentsGetterOnUI& web_contents_getter, |
469 int cert_error, | 470 int cert_error, |
470 const net::SSLInfo& ssl_info, | 471 const net::SSLInfo& ssl_info, |
471 const GURL& request_url, | 472 const GURL& request_url, |
472 ResourceType resource_type, | 473 ResourceType resource_type, |
473 bool overridable, | 474 bool overridable, |
474 bool strict_enforcement, | 475 bool strict_enforcement, |
475 bool expired_previous_decision, | 476 bool expired_previous_decision, |
476 const base::Callback<void(bool)>& callback, | 477 const base::Callback<void(bool)>& callback, |
477 CertificateRequestResultType* result) {} | 478 CertificateRequestResultType* result) {} |
478 | 479 |
479 // Selects a SSL client certificate and returns it to the |delegate|. Note: | 480 // Selects a SSL client certificate and returns it to the |delegate|. Note: |
480 // |delegate| may be called synchronously or asynchronously. | 481 // |delegate| may be called synchronously or asynchronously. |
481 // | 482 // |
482 // TODO(davidben): Move this hook to WebContentsDelegate. | 483 // TODO(davidben): Move this hook to WebContentsDelegate. |
483 virtual void SelectClientCertificate( | 484 virtual void SelectClientCertificate( |
484 WebContents* web_contents, | 485 WebContents* web_contents, |
485 net::SSLCertRequestInfo* cert_request_info, | 486 net::SSLCertRequestInfo* cert_request_info, |
486 scoped_ptr<ClientCertificateDelegate> delegate); | 487 scoped_ptr<ClientCertificateDelegate> delegate); |
487 | 488 |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 // Allows an embedder to provide its own ExternalVideoSurfaceContainer | 756 // Allows an embedder to provide its own ExternalVideoSurfaceContainer |
756 // implementation. Return nullptr to disable external surface video. | 757 // implementation. Return nullptr to disable external surface video. |
757 virtual ExternalVideoSurfaceContainer* | 758 virtual ExternalVideoSurfaceContainer* |
758 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); | 759 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); |
759 #endif | 760 #endif |
760 }; | 761 }; |
761 | 762 |
762 } // namespace content | 763 } // namespace content |
763 | 764 |
764 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 765 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |