| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_STATE_WEB_STATE_H_ | 5 #ifndef IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_ |
| 6 #define IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_ | 6 #define IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 // Resizes |content_view| to the content area's size and adds it to the | 193 // Resizes |content_view| to the content area's size and adds it to the |
| 194 // hierarchy. A navigation will remove the view from the hierarchy. | 194 // hierarchy. A navigation will remove the view from the hierarchy. |
| 195 virtual void ShowTransientContentView(CRWContentView* content_view) = 0; | 195 virtual void ShowTransientContentView(CRWContentView* content_view) = 0; |
| 196 | 196 |
| 197 // Returns true if a WebInterstitial is currently displayed. | 197 // Returns true if a WebInterstitial is currently displayed. |
| 198 virtual bool IsShowingWebInterstitial() const = 0; | 198 virtual bool IsShowingWebInterstitial() const = 0; |
| 199 | 199 |
| 200 // Returns the currently visible WebInterstitial if one is shown. | 200 // Returns the currently visible WebInterstitial if one is shown. |
| 201 virtual WebInterstitial* GetWebInterstitial() const = 0; | 201 virtual WebInterstitial* GetWebInterstitial() const = 0; |
| 202 | 202 |
| 203 // Tells the WebState that the current page is an HTTP page | 203 // Called when the WebState has displayed a password field on an HTTP page. |
| 204 // containing a password field. | 204 // This method modifies the appropriate NavigationEntry's SSLStatus to record |
| 205 // the sensitive input field, so that embedders can adjust the UI if desired. |
| 205 virtual void OnPasswordInputShownOnHttp() = 0; | 206 virtual void OnPasswordInputShownOnHttp() = 0; |
| 206 | 207 |
| 208 // Called when the WebState has displayed a credit card field on an HTTP page. |
| 209 // This method modifies the appropriate NavigationEntry's SSLStatus to record |
| 210 // the sensitive input field, so that embedders can adjust the UI if desired. |
| 211 virtual void OnCreditCardInputShownOnHttp() = 0; |
| 212 |
| 207 // Callback used to handle script commands. | 213 // Callback used to handle script commands. |
| 208 // The callback must return true if the command was handled, and false | 214 // The callback must return true if the command was handled, and false |
| 209 // otherwise. | 215 // otherwise. |
| 210 // In particular the callback must return false if the command is unexpected | 216 // In particular the callback must return false if the command is unexpected |
| 211 // or ill-formatted. | 217 // or ill-formatted. |
| 212 // The first parameter is the content of the command, the second parameter is | 218 // The first parameter is the content of the command, the second parameter is |
| 213 // the URL of the page, and the third parameter is a bool indicating if the | 219 // the URL of the page, and the third parameter is a bool indicating if the |
| 214 // user is currently interacting with the page. | 220 // user is currently interacting with the page. |
| 215 typedef base::Callback<bool(const base::DictionaryValue&, const GURL&, bool)> | 221 typedef base::Callback<bool(const base::DictionaryValue&, const GURL&, bool)> |
| 216 ScriptCommandCallback; | 222 ScriptCommandCallback; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 | 278 |
| 273 // Returns a WeakPtr<WebState> to the current WebState. Must remain private | 279 // Returns a WeakPtr<WebState> to the current WebState. Must remain private |
| 274 // and only call must be in WebStateWeakPtrFactory. Please consult that class | 280 // and only call must be in WebStateWeakPtrFactory. Please consult that class |
| 275 // for more details. Remove as part of http://crbug.com/556736. | 281 // for more details. Remove as part of http://crbug.com/556736. |
| 276 virtual base::WeakPtr<WebState> AsWeakPtr() = 0; | 282 virtual base::WeakPtr<WebState> AsWeakPtr() = 0; |
| 277 }; | 283 }; |
| 278 | 284 |
| 279 } // namespace web | 285 } // namespace web |
| 280 | 286 |
| 281 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_ | 287 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_ |
| OLD | NEW |