| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 IOS_WEB_PUBLIC_WEB_CLIENT_H_ | 5 #ifndef IOS_WEB_PUBLIC_WEB_CLIENT_H_ |
| 6 #define IOS_WEB_PUBLIC_WEB_CLIENT_H_ | 6 #define IOS_WEB_PUBLIC_WEB_CLIENT_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include <string> | 9 #include <string> |
| 9 #include <vector> | 10 #include <vector> |
| 10 | 11 |
| 11 #include "base/callback.h" | 12 #include "base/callback.h" |
| 12 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 13 #include "base/strings/string_piece.h" | 14 #include "base/strings/string_piece.h" |
| 14 #include "base/task_scheduler/task_scheduler.h" | 15 #include "base/task_scheduler/task_scheduler.h" |
| 15 #include "ui/base/layout.h" | 16 #include "ui/base/layout.h" |
| 16 #include "url/url_util.h" | 17 #include "url/url_util.h" |
| 17 | 18 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 43 WebClient* GetWebClient(); | 44 WebClient* GetWebClient(); |
| 44 | 45 |
| 45 // Interface that the embedder of the web layer implements. | 46 // Interface that the embedder of the web layer implements. |
| 46 class WebClient { | 47 class WebClient { |
| 47 public: | 48 public: |
| 48 WebClient(); | 49 WebClient(); |
| 49 virtual ~WebClient(); | 50 virtual ~WebClient(); |
| 50 | 51 |
| 51 // Allows the embedder to set a custom WebMainParts implementation for the | 52 // Allows the embedder to set a custom WebMainParts implementation for the |
| 52 // browser startup code. | 53 // browser startup code. |
| 53 virtual WebMainParts* CreateWebMainParts(); | 54 virtual std::unique_ptr<WebMainParts> CreateWebMainParts(); |
| 54 | 55 |
| 55 // Gives the embedder a chance to perform tasks before a web view is created. | 56 // Gives the embedder a chance to perform tasks before a web view is created. |
| 56 virtual void PreWebViewCreation() const {} | 57 virtual void PreWebViewCreation() const {} |
| 57 | 58 |
| 58 // Gives the embedder a chance to register its own standard and saveable url | 59 // Gives the embedder a chance to register its own standard and saveable url |
| 59 // schemes early on in the startup sequence. | 60 // schemes early on in the startup sequence. |
| 60 virtual void AddAdditionalSchemes( | 61 virtual void AddAdditionalSchemes( |
| 61 std::vector<url::SchemeWithType>* additional_standard_schemes) const {} | 62 std::vector<url::SchemeWithType>* additional_standard_schemes) const {} |
| 62 | 63 |
| 63 // Returns the languages used in the Accept-Languages HTTP header. | 64 // Returns the languages used in the Accept-Languages HTTP header. |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 base::TaskScheduler::WorkerPoolIndexForTraitsCallback* | 138 base::TaskScheduler::WorkerPoolIndexForTraitsCallback* |
| 138 index_to_traits_callback) {} | 139 index_to_traits_callback) {} |
| 139 | 140 |
| 140 // Performs any necessary PostTask API redirection to the task scheduler. | 141 // Performs any necessary PostTask API redirection to the task scheduler. |
| 141 virtual void PerformExperimentalTaskSchedulerRedirections() {} | 142 virtual void PerformExperimentalTaskSchedulerRedirections() {} |
| 142 }; | 143 }; |
| 143 | 144 |
| 144 } // namespace web | 145 } // namespace web |
| 145 | 146 |
| 146 #endif // IOS_WEB_PUBLIC_WEB_CLIENT_H_ | 147 #endif // IOS_WEB_PUBLIC_WEB_CLIENT_H_ |
| OLD | NEW |