| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 | 117 |
| 118 // Gets the BrowserState associated with this WebState. Can never return null. | 118 // Gets the BrowserState associated with this WebState. Can never return null. |
| 119 virtual BrowserState* GetBrowserState() const = 0; | 119 virtual BrowserState* GetBrowserState() const = 0; |
| 120 | 120 |
| 121 // Opens a URL with the given disposition. The transition specifies how this | 121 // Opens a URL with the given disposition. The transition specifies how this |
| 122 // navigation should be recorded in the history system (for example, typed). | 122 // navigation should be recorded in the history system (for example, typed). |
| 123 virtual void OpenURL(const OpenURLParams& params) = 0; | 123 virtual void OpenURL(const OpenURLParams& params) = 0; |
| 124 | 124 |
| 125 // Gets the NavigationManager associated with this WebState. Can never return | 125 // Gets the NavigationManager associated with this WebState. Can never return |
| 126 // null. | 126 // null. |
| 127 virtual const NavigationManager* GetNavigationManager() const = 0; |
| 127 virtual NavigationManager* GetNavigationManager() = 0; | 128 virtual NavigationManager* GetNavigationManager() = 0; |
| 128 | 129 |
| 129 // Gets the CRWJSInjectionReceiver associated with this WebState. | 130 // Gets the CRWJSInjectionReceiver associated with this WebState. |
| 130 virtual CRWJSInjectionReceiver* GetJSInjectionReceiver() const = 0; | 131 virtual CRWJSInjectionReceiver* GetJSInjectionReceiver() const = 0; |
| 131 | 132 |
| 132 // Runs JavaScript in the main frame's context. If a callback is provided, it | 133 // Runs JavaScript in the main frame's context. If a callback is provided, it |
| 133 // will be used to return the result, when the result is available or script | 134 // will be used to return the result, when the result is available or script |
| 134 // execution has failed due to an error. | 135 // execution has failed due to an error. |
| 135 // NOTE: Integer values will be returned as TYPE_DOUBLE because of underlying | 136 // NOTE: Integer values will be returned as TYPE_DOUBLE because of underlying |
| 136 // library limitation. | 137 // library limitation. |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 | 263 |
| 263 // Returns a WeakPtr<WebState> to the current WebState. Must remain private | 264 // Returns a WeakPtr<WebState> to the current WebState. Must remain private |
| 264 // and only call must be in WebStateWeakPtrFactory. Please consult that class | 265 // and only call must be in WebStateWeakPtrFactory. Please consult that class |
| 265 // for more details. Remove as part of http://crbug.com/556736. | 266 // for more details. Remove as part of http://crbug.com/556736. |
| 266 virtual base::WeakPtr<WebState> AsWeakPtr() = 0; | 267 virtual base::WeakPtr<WebState> AsWeakPtr() = 0; |
| 267 }; | 268 }; |
| 268 | 269 |
| 269 } // namespace web | 270 } // namespace web |
| 270 | 271 |
| 271 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_ | 272 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_ |
| OLD | NEW |