| 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> |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 struct WebPreferences; | 36 struct WebPreferences; |
| 37 | 37 |
| 38 namespace WebKit { | 38 namespace WebKit { |
| 39 struct WebWindowFeatures; | 39 struct WebWindowFeatures; |
| 40 } | 40 } |
| 41 | 41 |
| 42 namespace base { | 42 namespace base { |
| 43 class DictionaryValue; | 43 class DictionaryValue; |
| 44 class FilePath; | 44 class FilePath; |
| 45 } | 45 } |
| 46 namespace crypto { | |
| 47 class CryptoModuleBlockingPasswordDelegate; | |
| 48 } | |
| 49 | 46 |
| 50 namespace gfx { | 47 namespace gfx { |
| 51 class ImageSkia; | 48 class ImageSkia; |
| 52 } | 49 } |
| 53 | 50 |
| 54 namespace net { | 51 namespace net { |
| 52 class ClientCertStore; |
| 55 class CookieOptions; | 53 class CookieOptions; |
| 56 class HttpNetworkSession; | 54 class HttpNetworkSession; |
| 57 class NetLog; | 55 class NetLog; |
| 58 class SSLCertRequestInfo; | 56 class SSLCertRequestInfo; |
| 59 class SSLInfo; | 57 class SSLInfo; |
| 60 class URLRequest; | 58 class URLRequest; |
| 61 class URLRequestContext; | 59 class URLRequestContext; |
| 62 class URLRequestContextGetter; | 60 class URLRequestContextGetter; |
| 63 class X509Certificate; | 61 class X509Certificate; |
| 64 } | 62 } |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 int render_view_id, | 387 int render_view_id, |
| 390 int cert_error, | 388 int cert_error, |
| 391 const net::SSLInfo& ssl_info, | 389 const net::SSLInfo& ssl_info, |
| 392 const GURL& request_url, | 390 const GURL& request_url, |
| 393 ResourceType::Type resource_type, | 391 ResourceType::Type resource_type, |
| 394 bool overridable, | 392 bool overridable, |
| 395 bool strict_enforcement, | 393 bool strict_enforcement, |
| 396 const base::Callback<void(bool)>& callback, | 394 const base::Callback<void(bool)>& callback, |
| 397 CertificateRequestResultType* result) {} | 395 CertificateRequestResultType* result) {} |
| 398 | 396 |
| 397 // Get platform ClientCertStore. May return NULL. |
| 398 virtual scoped_ptr<net::ClientCertStore> GetClientCertStore( |
| 399 ResourceContext* context); |
| 400 |
| 399 // Selects a SSL client certificate and returns it to the |callback|. If no | 401 // Selects a SSL client certificate and returns it to the |callback|. If no |
| 400 // certificate was selected NULL is returned to the |callback|. | 402 // certificate was selected NULL is returned to the |callback|. |
| 401 virtual void SelectClientCertificate( | 403 virtual void SelectClientCertificate( |
| 402 int render_process_id, | 404 int render_process_id, |
| 403 int render_view_id, | 405 int render_view_id, |
| 404 const net::HttpNetworkSession* network_session, | 406 const net::HttpNetworkSession* network_session, |
| 405 net::SSLCertRequestInfo* cert_request_info, | 407 net::SSLCertRequestInfo* cert_request_info, |
| 406 const base::Callback<void(net::X509Certificate*)>& callback) {} | 408 const base::Callback<void(net::X509Certificate*)>& callback) {} |
| 407 | 409 |
| 408 // Adds a new installable certificate or private key. | 410 // Adds a new installable certificate or private key. |
| 409 // Typically used to install an X.509 user certificate. | 411 // Typically used to install an X.509 user certificate. |
| 410 // Note that it's up to the embedder to verify that the data is | 412 // Note that it's up to the embedder to verify that the data is |
| 411 // well-formed. |cert_data| will be NULL if file_size is 0. | 413 // well-formed. |cert_data| will be NULL if file_size is 0. |
| 412 virtual void AddCertificate( | 414 virtual void AddCertificate( |
| 413 net::URLRequest* request, | 415 net::URLRequest* request, |
| 414 net::CertificateMimeType cert_type, | 416 net::CertificateMimeType cert_type, |
| 415 const void* cert_data, | 417 const void* cert_data, |
| 416 size_t cert_size, | 418 size_t cert_size, |
| 417 int render_process_id, | 419 int render_process_id, |
| 418 int render_view_id) {} | 420 int render_view_id) {} |
| 419 | 421 |
| 422 // Generate keypair for <keygen>. The |callback| will be called with the |
| 423 // base64 encoded signedPublicKeyAndChallenge DER data, or in the case of |
| 424 // error NULL or empty string. |
| 425 virtual void GenerateKey( |
| 426 ResourceContext* context, |
| 427 int key_size_in_bits, |
| 428 const std::string& challenge, |
| 429 const GURL& url, |
| 430 const base::Callback<void(const std::string*)>& callback) {} |
| 431 |
| 420 // Returns a class to get notifications about media event. The embedder can | 432 // Returns a class to get notifications about media event. The embedder can |
| 421 // return NULL if they're not interested. | 433 // return NULL if they're not interested. |
| 422 virtual MediaObserver* GetMediaObserver(); | 434 virtual MediaObserver* GetMediaObserver(); |
| 423 | 435 |
| 424 // Asks permission to show desktop notifications. | 436 // Asks permission to show desktop notifications. |
| 425 virtual void RequestDesktopNotificationPermission( | 437 virtual void RequestDesktopNotificationPermission( |
| 426 const GURL& source_origin, | 438 const GURL& source_origin, |
| 427 int callback_context, | 439 int callback_context, |
| 428 int render_process_id, | 440 int render_process_id, |
| 429 int render_view_id) {} | 441 int render_view_id) {} |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 // Returns the name of the dll that contains cursors and other resources. | 596 // Returns the name of the dll that contains cursors and other resources. |
| 585 virtual const wchar_t* GetResourceDllName(); | 597 virtual const wchar_t* GetResourceDllName(); |
| 586 | 598 |
| 587 // This is called on the PROCESS_LAUNCHER thread before the renderer process | 599 // This is called on the PROCESS_LAUNCHER thread before the renderer process |
| 588 // is launched. It gives the embedder a chance to add loosen the sandbox | 600 // is launched. It gives the embedder a chance to add loosen the sandbox |
| 589 // policy. | 601 // policy. |
| 590 virtual void PreSpawnRenderer(sandbox::TargetPolicy* policy, | 602 virtual void PreSpawnRenderer(sandbox::TargetPolicy* policy, |
| 591 bool* success) {} | 603 bool* success) {} |
| 592 #endif | 604 #endif |
| 593 | 605 |
| 594 #if defined(USE_NSS) | |
| 595 // Return a delegate to authenticate and unlock |module|. | |
| 596 // This is called on a worker thread. | |
| 597 virtual | |
| 598 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( | |
| 599 const GURL& url); | |
| 600 #endif | |
| 601 | |
| 602 // Returns true if plugin referred to by the url can use | 606 // Returns true if plugin referred to by the url can use |
| 603 // pp::FileIO::RequestOSFileHandle. | 607 // pp::FileIO::RequestOSFileHandle. |
| 604 virtual bool IsPluginAllowedToCallRequestOSFileHandle( | 608 virtual bool IsPluginAllowedToCallRequestOSFileHandle( |
| 605 content::BrowserContext* browser_context, | 609 content::BrowserContext* browser_context, |
| 606 const GURL& url); | 610 const GURL& url); |
| 611 |
| 607 }; | 612 }; |
| 608 | 613 |
| 609 } // namespace content | 614 } // namespace content |
| 610 | 615 |
| 611 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 616 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |