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 shell { | 38 namespace service_manager { |
39 class InterfaceRegistry; | 39 class InterfaceRegistry; |
40 } | 40 } |
41 | 41 |
42 namespace web { | 42 namespace web { |
43 | 43 |
44 class BrowserState; | 44 class BrowserState; |
45 class NavigationManager; | 45 class NavigationManager; |
46 class WebInterstitial; | 46 class WebInterstitial; |
47 class WebStateDelegate; | 47 class WebStateDelegate; |
48 class WebStateObserver; | 48 class WebStateObserver; |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 // is the only result. A |max_bitmap_size| of 0 means unlimited. | 231 // is the only result. A |max_bitmap_size| of 0 means unlimited. |
232 // If |bypass_cache| is true, |url| is requested from the server even if it | 232 // If |bypass_cache| is true, |url| is requested from the server even if it |
233 // is present in the browser cache. | 233 // is present in the browser cache. |
234 virtual int DownloadImage(const GURL& url, | 234 virtual int DownloadImage(const GURL& url, |
235 bool is_favicon, | 235 bool is_favicon, |
236 uint32_t max_bitmap_size, | 236 uint32_t max_bitmap_size, |
237 bool bypass_cache, | 237 bool bypass_cache, |
238 const ImageDownloadCallback& callback) = 0; | 238 const ImageDownloadCallback& callback) = 0; |
239 | 239 |
240 // Returns Mojo interface registry for this WebState. | 240 // Returns Mojo interface registry for this WebState. |
241 virtual shell::InterfaceRegistry* GetMojoInterfaceRegistry() = 0; | 241 virtual service_manager::InterfaceRegistry* GetMojoInterfaceRegistry() = 0; |
242 | 242 |
243 protected: | 243 protected: |
244 friend class WebStateObserver; | 244 friend class WebStateObserver; |
245 friend class WebStatePolicyDecider; | 245 friend class WebStatePolicyDecider; |
246 | 246 |
247 // Adds and removes observers for page navigation notifications. The order in | 247 // Adds and removes observers for page navigation notifications. The order in |
248 // which notifications are sent to observers is undefined. Clients must be | 248 // which notifications are sent to observers is undefined. Clients must be |
249 // sure to remove the observer before they go away. | 249 // sure to remove the observer before they go away. |
250 // TODO(droger): Move these methods to WebStateImpl once it is in ios/. | 250 // TODO(droger): Move these methods to WebStateImpl once it is in ios/. |
251 virtual void AddObserver(WebStateObserver* observer) = 0; | 251 virtual void AddObserver(WebStateObserver* observer) = 0; |
(...skipping 13 matching lines...) Expand all Loading... |
265 | 265 |
266 // Returns a WeakPtr<WebState> to the current WebState. Must remain private | 266 // Returns a WeakPtr<WebState> to the current WebState. Must remain private |
267 // and only call must be in WebStateWeakPtrFactory. Please consult that class | 267 // and only call must be in WebStateWeakPtrFactory. Please consult that class |
268 // for more details. Remove as part of http://crbug.com/556736. | 268 // for more details. Remove as part of http://crbug.com/556736. |
269 virtual base::WeakPtr<WebState> AsWeakPtr() = 0; | 269 virtual base::WeakPtr<WebState> AsWeakPtr() = 0; |
270 }; | 270 }; |
271 | 271 |
272 } // namespace web | 272 } // namespace web |
273 | 273 |
274 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_ | 274 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_H_ |
OLD | NEW |