| 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/common/content_client.h" | 20 #include "content/public/common/content_client.h" |
| 20 #include "content/public/common/media_stream_request.h" | 21 #include "content/public/common/media_stream_request.h" |
| 21 #include "content/public/common/resource_type.h" | 22 #include "content/public/common/resource_type.h" |
| 22 #include "content/public/common/socket_permission_request.h" | 23 #include "content/public/common/socket_permission_request.h" |
| 23 #include "content/public/common/window_container_type.h" | 24 #include "content/public/common/window_container_type.h" |
| 24 #include "net/base/mime_util.h" | 25 #include "net/base/mime_util.h" |
| 25 #include "net/cookies/canonical_cookie.h" | 26 #include "net/cookies/canonical_cookie.h" |
| 26 #include "net/url_request/url_request_interceptor.h" | 27 #include "net/url_request/url_request_interceptor.h" |
| 27 #include "net/url_request/url_request_job_factory.h" | 28 #include "net/url_request/url_request_job_factory.h" |
| 28 #include "storage/browser/fileapi/file_system_context.h" | 29 #include "storage/browser/fileapi/file_system_context.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 class BrowserContext; | 90 class BrowserContext; |
| 90 class BrowserMainParts; | 91 class BrowserMainParts; |
| 91 class BrowserPluginGuestDelegate; | 92 class BrowserPluginGuestDelegate; |
| 92 class BrowserPpapiHost; | 93 class BrowserPpapiHost; |
| 93 class BrowserURLHandler; | 94 class BrowserURLHandler; |
| 94 class ClientCertificateDelegate; | 95 class ClientCertificateDelegate; |
| 95 class DevToolsManagerDelegate; | 96 class DevToolsManagerDelegate; |
| 96 class ExternalVideoSurfaceContainer; | 97 class ExternalVideoSurfaceContainer; |
| 97 class LocationProvider; | 98 class LocationProvider; |
| 98 class MediaObserver; | 99 class MediaObserver; |
| 100 class NavigationHandle; |
| 99 class NavigatorConnectContext; | 101 class NavigatorConnectContext; |
| 100 class NavigatorConnectServiceFactory; | 102 class NavigatorConnectServiceFactory; |
| 101 class PlatformNotificationService; | 103 class PlatformNotificationService; |
| 102 class PresentationServiceDelegate; | 104 class PresentationServiceDelegate; |
| 103 class QuotaPermissionContext; | 105 class QuotaPermissionContext; |
| 104 class RenderFrameHost; | 106 class RenderFrameHost; |
| 105 class RenderProcessHost; | 107 class RenderProcessHost; |
| 106 class RenderViewHost; | 108 class RenderViewHost; |
| 107 class ResourceContext; | 109 class ResourceContext; |
| 108 class ServiceRegistry; | 110 class ServiceRegistry; |
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 // Allows programmatic opening of a new tab/window without going through | 669 // Allows programmatic opening of a new tab/window without going through |
| 668 // another WebContents. For example, from a Worker. |callback| will be | 670 // another WebContents. For example, from a Worker. |callback| will be |
| 669 // invoked with the appropriate WebContents* when available. | 671 // invoked with the appropriate WebContents* when available. |
| 670 virtual void OpenURL(BrowserContext* browser_context, | 672 virtual void OpenURL(BrowserContext* browser_context, |
| 671 const OpenURLParams& params, | 673 const OpenURLParams& params, |
| 672 const base::Callback<void(WebContents*)>& callback); | 674 const base::Callback<void(WebContents*)>& callback); |
| 673 | 675 |
| 674 // Allows the embedder to record |metric| for a specific |url|. | 676 // Allows the embedder to record |metric| for a specific |url|. |
| 675 virtual void RecordURLMetric(const std::string& metric, const GURL& url) {} | 677 virtual void RecordURLMetric(const std::string& metric, const GURL& url) {} |
| 676 | 678 |
| 679 // Allows the embedder to register one or more NavigationThrottles for the |
| 680 // navigation indicated by |navigation_handle|. A NavigationThrottle is used |
| 681 // to control the flow of a navigation on the UI thread. The embedder is |
| 682 // guaranteed that the throttles will be executed in the order they were |
| 683 // provided. |
| 684 virtual ScopedVector<NavigationThrottle> CreateThrottlesForNavigation( |
| 685 NavigationHandle* navigation_handle); |
| 686 |
| 677 // Populates |mappings| with all files that need to be mapped before launching | 687 // Populates |mappings| with all files that need to be mapped before launching |
| 678 // a child process. | 688 // a child process. |
| 679 #if defined(OS_ANDROID) | 689 #if defined(OS_ANDROID) |
| 680 virtual void GetAdditionalMappedFilesForChildProcess( | 690 virtual void GetAdditionalMappedFilesForChildProcess( |
| 681 const base::CommandLine& command_line, | 691 const base::CommandLine& command_line, |
| 682 int child_process_id, | 692 int child_process_id, |
| 683 content::FileDescriptorInfo* mappings, | 693 content::FileDescriptorInfo* mappings, |
| 684 std::map<int, base::MemoryMappedFile::Region>* regions) {} | 694 std::map<int, base::MemoryMappedFile::Region>* regions) {} |
| 685 #elif defined(OS_POSIX) && !defined(OS_MACOSX) | 695 #elif defined(OS_POSIX) && !defined(OS_MACOSX) |
| 686 virtual void GetAdditionalMappedFilesForChildProcess( | 696 virtual void GetAdditionalMappedFilesForChildProcess( |
| (...skipping 23 matching lines...) Expand all Loading... |
| 710 // Allows an embedder to provide its own ExternalVideoSurfaceContainer | 720 // Allows an embedder to provide its own ExternalVideoSurfaceContainer |
| 711 // implementation. Return nullptr to disable external surface video. | 721 // implementation. Return nullptr to disable external surface video. |
| 712 virtual ExternalVideoSurfaceContainer* | 722 virtual ExternalVideoSurfaceContainer* |
| 713 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); | 723 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); |
| 714 #endif | 724 #endif |
| 715 }; | 725 }; |
| 716 | 726 |
| 717 } // namespace content | 727 } // namespace content |
| 718 | 728 |
| 719 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 729 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |