| 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 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 virtual void GetURLRequestAutoMountHandlers( | 614 virtual void GetURLRequestAutoMountHandlers( |
| 616 std::vector<storage::URLRequestAutoMountHandler>* handlers) {} | 615 std::vector<storage::URLRequestAutoMountHandler>* handlers) {} |
| 617 | 616 |
| 618 // Returns additional file system backends for FileSystem API. | 617 // Returns additional file system backends for FileSystem API. |
| 619 // |browser_context| is needed in the additional FileSystemBackends. | 618 // |browser_context| is needed in the additional FileSystemBackends. |
| 620 // It has mount points to create objects returned by additional | 619 // It has mount points to create objects returned by additional |
| 621 // FileSystemBackends, and SpecialStoragePolicy for permission granting. | 620 // FileSystemBackends, and SpecialStoragePolicy for permission granting. |
| 622 virtual void GetAdditionalFileSystemBackends( | 621 virtual void GetAdditionalFileSystemBackends( |
| 623 BrowserContext* browser_context, | 622 BrowserContext* browser_context, |
| 624 const base::FilePath& storage_partition_path, | 623 const base::FilePath& storage_partition_path, |
| 625 ScopedVector<storage::FileSystemBackend>* additional_backends) {} | 624 std::vector<std::unique_ptr<storage::FileSystemBackend>>* |
| 625 additional_backends) {} |
| 626 | 626 |
| 627 // Creates a new DevToolsManagerDelegate. The caller owns the returned value. | 627 // Creates a new DevToolsManagerDelegate. The caller owns the returned value. |
| 628 // It's valid to return nullptr. | 628 // It's valid to return nullptr. |
| 629 virtual DevToolsManagerDelegate* GetDevToolsManagerDelegate(); | 629 virtual DevToolsManagerDelegate* GetDevToolsManagerDelegate(); |
| 630 | 630 |
| 631 // Creates a new TracingDelegate. The caller owns the returned value. | 631 // Creates a new TracingDelegate. The caller owns the returned value. |
| 632 // It's valid to return nullptr. | 632 // It's valid to return nullptr. |
| 633 virtual TracingDelegate* GetTracingDelegate(); | 633 virtual TracingDelegate* GetTracingDelegate(); |
| 634 | 634 |
| 635 // Returns true if plugin referred to by the url can use | 635 // Returns true if plugin referred to by the url can use |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 737 const base::Callback<void(WebContents*)>& callback); | 737 const base::Callback<void(WebContents*)>& callback); |
| 738 | 738 |
| 739 // Allows the embedder to record |metric| for a specific |url|. | 739 // Allows the embedder to record |metric| for a specific |url|. |
| 740 virtual void RecordURLMetric(const std::string& metric, const GURL& url) {} | 740 virtual void RecordURLMetric(const std::string& metric, const GURL& url) {} |
| 741 | 741 |
| 742 // Allows the embedder to register one or more NavigationThrottles for the | 742 // Allows the embedder to register one or more NavigationThrottles for the |
| 743 // navigation indicated by |navigation_handle|. A NavigationThrottle is used | 743 // navigation indicated by |navigation_handle|. A NavigationThrottle is used |
| 744 // to control the flow of a navigation on the UI thread. The embedder is | 744 // to control the flow of a navigation on the UI thread. The embedder is |
| 745 // guaranteed that the throttles will be executed in the order they were | 745 // guaranteed that the throttles will be executed in the order they were |
| 746 // provided. | 746 // provided. |
| 747 virtual ScopedVector<NavigationThrottle> CreateThrottlesForNavigation( | 747 virtual std::vector<std::unique_ptr<NavigationThrottle>> |
| 748 NavigationHandle* navigation_handle); | 748 CreateThrottlesForNavigation(NavigationHandle* navigation_handle); |
| 749 | 749 |
| 750 // PlzNavigate | 750 // PlzNavigate |
| 751 // Called at the start of the navigation to get opaque data the embedder | 751 // Called at the start of the navigation to get opaque data the embedder |
| 752 // wants to see passed to the corresponding URLRequest on the IO thread. | 752 // wants to see passed to the corresponding URLRequest on the IO thread. |
| 753 virtual std::unique_ptr<NavigationUIData> GetNavigationUIData( | 753 virtual std::unique_ptr<NavigationUIData> GetNavigationUIData( |
| 754 NavigationHandle* navigation_handle); | 754 NavigationHandle* navigation_handle); |
| 755 | 755 |
| 756 // Allows the embedder to provide its own AudioManager implementation. | 756 // Allows the embedder to provide its own AudioManager implementation. |
| 757 // If this function returns nullptr, a default platform implementation | 757 // If this function returns nullptr, a default platform implementation |
| 758 // will be used. | 758 // will be used. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 814 virtual bool ShouldRedirectDOMStorageTaskRunner(); | 814 virtual bool ShouldRedirectDOMStorageTaskRunner(); |
| 815 | 815 |
| 816 // If this returns true, all BrowserThreads (but UI/IO) that support it on | 816 // If this returns true, all BrowserThreads (but UI/IO) that support it on |
| 817 // this platform will experimentally be redirected to TaskScheduler. | 817 // this platform will experimentally be redirected to TaskScheduler. |
| 818 virtual bool RedirectNonUINonIOBrowserThreadsToTaskScheduler(); | 818 virtual bool RedirectNonUINonIOBrowserThreadsToTaskScheduler(); |
| 819 }; | 819 }; |
| 820 | 820 |
| 821 } // namespace content | 821 } // namespace content |
| 822 | 822 |
| 823 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 823 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |