| 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 "ui/base/layout.h" | 15 #include "ui/base/layout.h" |
| 15 #include "url/url_util.h" | 16 #include "url/url_util.h" |
| 16 | 17 |
| 17 namespace base { | 18 namespace base { |
| 18 class RefCountedMemory; | 19 class RefCountedMemory; |
| 20 class SchedulerWorkerPoolParams; |
| 19 } | 21 } |
| 20 | 22 |
| 21 class GURL; | 23 class GURL; |
| 22 | 24 |
| 23 @class UIWebView; | 25 @class UIWebView; |
| 24 @class NSString; | 26 @class NSString; |
| 25 | 27 |
| 26 namespace net { | 28 namespace net { |
| 27 class SSLInfo; | 29 class SSLInfo; |
| 28 } | 30 } |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // |overridable| is true, the user can ignore the error and continue. The | 122 // |overridable| is true, the user can ignore the error and continue. The |
| 121 // embedder can call the |callback| asynchronously (an argument of true means | 123 // embedder can call the |callback| asynchronously (an argument of true means |
| 122 // that |cert_error| should be ignored and web// should load the page). | 124 // that |cert_error| should be ignored and web// should load the page). |
| 123 virtual void AllowCertificateError( | 125 virtual void AllowCertificateError( |
| 124 WebState* web_state, | 126 WebState* web_state, |
| 125 int cert_error, | 127 int cert_error, |
| 126 const net::SSLInfo& ssl_info, | 128 const net::SSLInfo& ssl_info, |
| 127 const GURL& request_url, | 129 const GURL& request_url, |
| 128 bool overridable, | 130 bool overridable, |
| 129 const base::Callback<void(bool)>& callback); | 131 const base::Callback<void(bool)>& callback); |
| 132 |
| 133 // Provides parameters for initializing the global task scheduler. If |
| 134 // |params_vector| is empty, default parameters are used. |
| 135 virtual void GetTaskSchedulerInitializationParams( |
| 136 std::vector<base::SchedulerWorkerPoolParams>* params_vector, |
| 137 base::TaskScheduler::WorkerPoolIndexForTraitsCallback* |
| 138 index_to_traits_callback) {} |
| 139 |
| 140 // Performs any necessary PostTask API redirection to the task scheduler. |
| 141 virtual void PerformExperimentalTaskSchedulerRedirections() {} |
| 130 }; | 142 }; |
| 131 | 143 |
| 132 } // namespace web | 144 } // namespace web |
| 133 | 145 |
| 134 #endif // IOS_WEB_PUBLIC_WEB_CLIENT_H_ | 146 #endif // IOS_WEB_PUBLIC_WEB_CLIENT_H_ |
| OLD | NEW |