| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <string> | 12 #include <string> |
| 13 #include <utility> | 13 #include <utility> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "base/callback_forward.h" | 16 #include "base/callback_forward.h" |
| 17 #include "base/memory/scoped_vector.h" | |
| 18 #include "base/task_scheduler/task_scheduler.h" | 17 #include "base/task_scheduler/task_scheduler.h" |
| 19 #include "base/values.h" | 18 #include "base/values.h" |
| 20 #include "build/build_config.h" | 19 #include "build/build_config.h" |
| 21 #include "content/public/browser/certificate_request_result_type.h" | 20 #include "content/public/browser/certificate_request_result_type.h" |
| 22 #include "content/public/browser/navigation_throttle.h" | 21 #include "content/public/browser/navigation_throttle.h" |
| 23 #include "content/public/common/content_client.h" | 22 #include "content/public/common/content_client.h" |
| 24 #include "content/public/common/media_stream_request.h" | 23 #include "content/public/common/media_stream_request.h" |
| 25 #include "content/public/common/resource_type.h" | 24 #include "content/public/common/resource_type.h" |
| 26 #include "content/public/common/service_info.h" | 25 #include "content/public/common/service_info.h" |
| 27 #include "content/public/common/socket_permission_request.h" | 26 #include "content/public/common/socket_permission_request.h" |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 virtual void GetURLRequestAutoMountHandlers( | 615 virtual void GetURLRequestAutoMountHandlers( |
| 617 std::vector<storage::URLRequestAutoMountHandler>* handlers) {} | 616 std::vector<storage::URLRequestAutoMountHandler>* handlers) {} |
| 618 | 617 |
| 619 // Returns additional file system backends for FileSystem API. | 618 // Returns additional file system backends for FileSystem API. |
| 620 // |browser_context| is needed in the additional FileSystemBackends. | 619 // |browser_context| is needed in the additional FileSystemBackends. |
| 621 // It has mount points to create objects returned by additional | 620 // It has mount points to create objects returned by additional |
| 622 // FileSystemBackends, and SpecialStoragePolicy for permission granting. | 621 // FileSystemBackends, and SpecialStoragePolicy for permission granting. |
| 623 virtual void GetAdditionalFileSystemBackends( | 622 virtual void GetAdditionalFileSystemBackends( |
| 624 BrowserContext* browser_context, | 623 BrowserContext* browser_context, |
| 625 const base::FilePath& storage_partition_path, | 624 const base::FilePath& storage_partition_path, |
| 626 ScopedVector<storage::FileSystemBackend>* additional_backends) {} | 625 std::vector<std::unique_ptr<storage::FileSystemBackend>>* |
| 626 additional_backends) {} |
| 627 | 627 |
| 628 // Creates a new DevToolsManagerDelegate. The caller owns the returned value. | 628 // Creates a new DevToolsManagerDelegate. The caller owns the returned value. |
| 629 // It's valid to return nullptr. | 629 // It's valid to return nullptr. |
| 630 virtual DevToolsManagerDelegate* GetDevToolsManagerDelegate(); | 630 virtual DevToolsManagerDelegate* GetDevToolsManagerDelegate(); |
| 631 | 631 |
| 632 // Creates a new TracingDelegate. The caller owns the returned value. | 632 // Creates a new TracingDelegate. The caller owns the returned value. |
| 633 // It's valid to return nullptr. | 633 // It's valid to return nullptr. |
| 634 virtual TracingDelegate* GetTracingDelegate(); | 634 virtual TracingDelegate* GetTracingDelegate(); |
| 635 | 635 |
| 636 // Returns true if plugin referred to by the url can use | 636 // Returns true if plugin referred to by the url can use |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 745 const base::Callback<void(WebContents*)>& callback); | 745 const base::Callback<void(WebContents*)>& callback); |
| 746 | 746 |
| 747 // Allows the embedder to record |metric| for a specific |url|. | 747 // Allows the embedder to record |metric| for a specific |url|. |
| 748 virtual void RecordURLMetric(const std::string& metric, const GURL& url) {} | 748 virtual void RecordURLMetric(const std::string& metric, const GURL& url) {} |
| 749 | 749 |
| 750 // Allows the embedder to register one or more NavigationThrottles for the | 750 // Allows the embedder to register one or more NavigationThrottles for the |
| 751 // navigation indicated by |navigation_handle|. A NavigationThrottle is used | 751 // navigation indicated by |navigation_handle|. A NavigationThrottle is used |
| 752 // to control the flow of a navigation on the UI thread. The embedder is | 752 // to control the flow of a navigation on the UI thread. The embedder is |
| 753 // guaranteed that the throttles will be executed in the order they were | 753 // guaranteed that the throttles will be executed in the order they were |
| 754 // provided. | 754 // provided. |
| 755 virtual ScopedVector<NavigationThrottle> CreateThrottlesForNavigation( | 755 virtual std::vector<std::unique_ptr<NavigationThrottle>> |
| 756 NavigationHandle* navigation_handle); | 756 CreateThrottlesForNavigation(NavigationHandle* navigation_handle); |
| 757 | 757 |
| 758 // PlzNavigate | 758 // PlzNavigate |
| 759 // Called at the start of the navigation to get opaque data the embedder | 759 // Called at the start of the navigation to get opaque data the embedder |
| 760 // wants to see passed to the corresponding URLRequest on the IO thread. | 760 // wants to see passed to the corresponding URLRequest on the IO thread. |
| 761 virtual std::unique_ptr<NavigationUIData> GetNavigationUIData( | 761 virtual std::unique_ptr<NavigationUIData> GetNavigationUIData( |
| 762 NavigationHandle* navigation_handle); | 762 NavigationHandle* navigation_handle); |
| 763 | 763 |
| 764 // Allows the embedder to provide its own AudioManager implementation. | 764 // Allows the embedder to provide its own AudioManager implementation. |
| 765 // If this function returns nullptr, a default platform implementation | 765 // If this function returns nullptr, a default platform implementation |
| 766 // will be used. | 766 // will be used. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 822 virtual bool ShouldRedirectDOMStorageTaskRunner(); | 822 virtual bool ShouldRedirectDOMStorageTaskRunner(); |
| 823 | 823 |
| 824 // If this returns true, all BrowserThreads (but UI/IO) that support it on | 824 // If this returns true, all BrowserThreads (but UI/IO) that support it on |
| 825 // this platform will experimentally be redirected to TaskScheduler. | 825 // this platform will experimentally be redirected to TaskScheduler. |
| 826 virtual bool RedirectNonUINonIOBrowserThreadsToTaskScheduler(); | 826 virtual bool RedirectNonUINonIOBrowserThreadsToTaskScheduler(); |
| 827 }; | 827 }; |
| 828 | 828 |
| 829 } // namespace content | 829 } // namespace content |
| 830 | 830 |
| 831 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 831 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |