| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 // Returns true if the current page is a web view with HTML. | 144 // Returns true if the current page is a web view with HTML. |
| 145 virtual bool ContentIsHTML() const = 0; | 145 virtual bool ContentIsHTML() const = 0; |
| 146 | 146 |
| 147 // Returns the current navigation title. This could be the title of the page | 147 // Returns the current navigation title. This could be the title of the page |
| 148 // if it is available or the URL. | 148 // if it is available or the URL. |
| 149 virtual const base::string16& GetTitle() const = 0; | 149 virtual const base::string16& GetTitle() const = 0; |
| 150 | 150 |
| 151 // Returns true if the current page is loading. | 151 // Returns true if the current page is loading. |
| 152 virtual bool IsLoading() const = 0; | 152 virtual bool IsLoading() const = 0; |
| 153 | 153 |
| 154 // The fraction of the page load that has completed as a number between 0.0 |
| 155 // (nothing loaded) and 1.0 (fully loaded). |
| 156 virtual double GetLoadingProgress() const = 0; |
| 157 |
| 154 // Whether this instance is in the process of being destroyed. | 158 // Whether this instance is in the process of being destroyed. |
| 155 virtual bool IsBeingDestroyed() const = 0; | 159 virtual bool IsBeingDestroyed() const = 0; |
| 156 | 160 |
| 157 // Gets the URL currently being displayed in the URL bar, if there is one. | 161 // Gets the URL currently being displayed in the URL bar, if there is one. |
| 158 // This URL might be a pending navigation that hasn't committed yet, so it is | 162 // This URL might be a pending navigation that hasn't committed yet, so it is |
| 159 // not guaranteed to match the current page in this WebState. A typical | 163 // not guaranteed to match the current page in this WebState. A typical |
| 160 // example of this is interstitials, which show the URL of the new/loading | 164 // example of this is interstitials, which show the URL of the new/loading |
| 161 // page (active) but the security context is of the old page (last committed). | 165 // page (active) but the security context is of the old page (last committed). |
| 162 virtual const GURL& GetVisibleURL() const = 0; | 166 virtual const GURL& GetVisibleURL() const = 0; |
| 163 | 167 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 | 255 |
| 252 // Returns a WeakPtr<WebState> to the current WebState. Must remain private | 256 // Returns a WeakPtr<WebState> to the current WebState. Must remain private |
| 253 // and only call must be in WebStateWeakPtrFactory. Please consult that class | 257 // and only call must be in WebStateWeakPtrFactory. Please consult that class |
| 254 // for more details. Remove as part of http://crbug.com/556736. | 258 // for more details. Remove as part of http://crbug.com/556736. |
| 255 virtual base::WeakPtr<WebState> AsWeakPtr() = 0; | 259 virtual base::WeakPtr<WebState> AsWeakPtr() = 0; |
| 256 }; | 260 }; |
| 257 | 261 |
| 258 } // namespace web | 262 } // namespace web |
| 259 | 263 |
| 260 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_ | 264 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_ |
| OLD | NEW |