| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
| 13 #include "base/strings/string_piece.h" | 13 #include "base/strings/string_piece.h" |
| 14 #include "base/task_scheduler/task_scheduler.h" | 14 #include "base/task_scheduler/task_scheduler.h" |
| 15 #include "ios/web/public/user_agent.h" | 15 #include "ios/web/public/user_agent.h" |
| 16 #include "ui/base/layout.h" | 16 #include "ui/base/layout.h" |
| 17 #include "url/url_util.h" | 17 #include "url/url_util.h" |
| 18 | 18 |
| 19 namespace base { | 19 namespace base { |
| 20 class RefCountedMemory; | 20 class RefCountedMemory; |
| 21 class SchedulerWorkerPoolParams; | |
| 22 } | 21 } |
| 23 | 22 |
| 24 class GURL; | 23 class GURL; |
| 25 | 24 |
| 26 @class UIWebView; | 25 @class UIWebView; |
| 27 @class NSString; | 26 @class NSString; |
| 28 | 27 |
| 29 namespace net { | 28 namespace net { |
| 30 class SSLInfo; | 29 class SSLInfo; |
| 31 } | 30 } |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 // embedder can call the |callback| asynchronously (an argument of true means | 117 // embedder can call the |callback| asynchronously (an argument of true means |
| 119 // that |cert_error| should be ignored and web// should load the page). | 118 // that |cert_error| should be ignored and web// should load the page). |
| 120 virtual void AllowCertificateError( | 119 virtual void AllowCertificateError( |
| 121 WebState* web_state, | 120 WebState* web_state, |
| 122 int cert_error, | 121 int cert_error, |
| 123 const net::SSLInfo& ssl_info, | 122 const net::SSLInfo& ssl_info, |
| 124 const GURL& request_url, | 123 const GURL& request_url, |
| 125 bool overridable, | 124 bool overridable, |
| 126 const base::Callback<void(bool)>& callback); | 125 const base::Callback<void(bool)>& callback); |
| 127 | 126 |
| 128 // Provides parameters for initializing the global task scheduler. If | 127 // Provides parameters for initializing the global task scheduler. Default |
| 129 // |params_vector| is empty, default parameters are used. | 128 // params are used if this returns nullptr. |
| 130 virtual void GetTaskSchedulerInitializationParams( | 129 virtual std::unique_ptr<base::TaskScheduler::InitParams> |
| 131 std::vector<base::SchedulerWorkerPoolParams>* params_vector, | 130 GetTaskSchedulerInitParams(); |
| 132 base::TaskScheduler::WorkerPoolIndexForTraitsCallback* | |
| 133 index_to_traits_callback) {} | |
| 134 | 131 |
| 135 // Performs any necessary PostTask API redirection to the task scheduler. | 132 // Performs any necessary PostTask API redirection to the task scheduler. |
| 136 virtual void PerformExperimentalTaskSchedulerRedirections() {} | 133 virtual void PerformExperimentalTaskSchedulerRedirections() {} |
| 137 }; | 134 }; |
| 138 | 135 |
| 139 } // namespace web | 136 } // namespace web |
| 140 | 137 |
| 141 #endif // IOS_WEB_PUBLIC_WEB_CLIENT_H_ | 138 #endif // IOS_WEB_PUBLIC_WEB_CLIENT_H_ |
| OLD | NEW |