Chromium Code Reviews| 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 17 matching lines...) Expand all Loading... | |
| 28 @protocol CRWWebViewProxy; | 28 @protocol CRWWebViewProxy; |
| 29 typedef id<CRWWebViewProxy> CRWWebViewProxyType; | 29 typedef id<CRWWebViewProxy> CRWWebViewProxyType; |
| 30 @class UIView; | 30 @class UIView; |
| 31 typedef UIView<CRWScrollableContent> CRWContentView; | 31 typedef UIView<CRWScrollableContent> CRWContentView; |
| 32 | 32 |
| 33 namespace base { | 33 namespace base { |
| 34 class DictionaryValue; | 34 class DictionaryValue; |
| 35 class Value; | 35 class Value; |
| 36 } | 36 } |
| 37 | 37 |
| 38 namespace gfx { | |
| 39 class Image; | |
| 40 } | |
| 41 | |
| 38 namespace web { | 42 namespace web { |
| 39 | 43 |
| 40 class BrowserState; | 44 class BrowserState; |
| 41 class NavigationManager; | 45 class NavigationManager; |
| 42 class SessionCertificatePolicyCache; | 46 class SessionCertificatePolicyCache; |
| 43 class WebInterstitial; | 47 class WebInterstitial; |
| 44 class WebStateDelegate; | 48 class WebStateDelegate; |
| 45 class WebStateInterfaceProvider; | 49 class WebStateInterfaceProvider; |
| 46 class WebStateObserver; | 50 class WebStateObserver; |
| 47 class WebStatePolicyDecider; | 51 class WebStatePolicyDecider; |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 241 // Returns the current CRWWebViewProxy object. | 245 // Returns the current CRWWebViewProxy object. |
| 242 virtual CRWWebViewProxyType GetWebViewProxy() const = 0; | 246 virtual CRWWebViewProxyType GetWebViewProxy() const = 0; |
| 243 | 247 |
| 244 // Returns Mojo interface registry for this WebState. | 248 // Returns Mojo interface registry for this WebState. |
| 245 virtual WebStateInterfaceProvider* GetWebStateInterfaceProvider() = 0; | 249 virtual WebStateInterfaceProvider* GetWebStateInterfaceProvider() = 0; |
| 246 | 250 |
| 247 // Returns whether this WebState was created with an opener. See | 251 // Returns whether this WebState was created with an opener. See |
| 248 // CreateParams::created_with_opener for more details. | 252 // CreateParams::created_with_opener for more details. |
| 249 virtual bool HasOpener() const = 0; | 253 virtual bool HasOpener() const = 0; |
| 250 | 254 |
| 255 // Takes a full-resolution snapshot of this WebState. | |
|
marq (ping after 24h)
2017/06/21 11:13:23
Document when |callback| will be called?
kkhorimoto
2017/06/21 20:06:52
You should also document that this API is asynchro
edchin
2017/06/22 07:01:07
Done.
edchin
2017/06/22 07:01:07
Made this asynchronous in pre-ios-11 versions as w
| |
| 256 virtual void TakeSnapshot( | |
|
Eugene But (OOO till 7-30)
2017/06/21 22:11:29
Do you want to pass width argument? Not every clie
edchin
2017/06/22 07:01:07
Resizing will take place elsewhere. That place wil
Eugene But (OOO till 7-30)
2017/06/22 19:34:14
What is the advantage of resizing elsewhere? Chang
edchin
2017/06/23 19:03:10
Per our offline discussion, I've added a CGSize ar
| |
| 257 const base::Callback<void(const gfx::Image& snapshot)>& callback) | |
|
kkhorimoto
2017/06/21 20:06:52
Optional: There's some precedent for typedefing Ca
edchin
2017/06/22 07:01:07
Done.
| |
| 258 const = 0; | |
| 259 | |
| 251 protected: | 260 protected: |
| 252 friend class WebStateObserver; | 261 friend class WebStateObserver; |
| 253 friend class WebStatePolicyDecider; | 262 friend class WebStatePolicyDecider; |
| 254 | 263 |
| 255 // Adds and removes observers for page navigation notifications. The order in | 264 // Adds and removes observers for page navigation notifications. The order in |
| 256 // which notifications are sent to observers is undefined. Clients must be | 265 // which notifications are sent to observers is undefined. Clients must be |
| 257 // sure to remove the observer before they go away. | 266 // sure to remove the observer before they go away. |
| 258 // TODO(droger): Move these methods to WebStateImpl once it is in ios/. | 267 // TODO(droger): Move these methods to WebStateImpl once it is in ios/. |
| 259 virtual void AddObserver(WebStateObserver* observer) = 0; | 268 virtual void AddObserver(WebStateObserver* observer) = 0; |
| 260 virtual void RemoveObserver(WebStateObserver* observer) = 0; | 269 virtual void RemoveObserver(WebStateObserver* observer) = 0; |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 273 | 282 |
| 274 // Returns a WeakPtr<WebState> to the current WebState. Must remain private | 283 // Returns a WeakPtr<WebState> to the current WebState. Must remain private |
| 275 // and only call must be in WebStateWeakPtrFactory. Please consult that class | 284 // and only call must be in WebStateWeakPtrFactory. Please consult that class |
| 276 // for more details. Remove as part of http://crbug.com/556736. | 285 // for more details. Remove as part of http://crbug.com/556736. |
| 277 virtual base::WeakPtr<WebState> AsWeakPtr() = 0; | 286 virtual base::WeakPtr<WebState> AsWeakPtr() = 0; |
| 278 }; | 287 }; |
| 279 | 288 |
| 280 } // namespace web | 289 } // namespace web |
| 281 | 290 |
| 282 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_ | 291 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_ |
| OLD | NEW |