| 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_WEB_STATE_WEB_STATE_IMPL_H_ | 5 #ifndef IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_ |
| 6 #define IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_ | 6 #define IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 WebInterstitial* GetWebInterstitial() const override; | 244 WebInterstitial* GetWebInterstitial() const override; |
| 245 void AddScriptCommandCallback(const ScriptCommandCallback& callback, | 245 void AddScriptCommandCallback(const ScriptCommandCallback& callback, |
| 246 const std::string& command_prefix) override; | 246 const std::string& command_prefix) override; |
| 247 void RemoveScriptCommandCallback(const std::string& command_prefix) override; | 247 void RemoveScriptCommandCallback(const std::string& command_prefix) override; |
| 248 id<CRWWebViewProxy> GetWebViewProxy() const override; | 248 id<CRWWebViewProxy> GetWebViewProxy() const override; |
| 249 int DownloadImage(const GURL& url, | 249 int DownloadImage(const GURL& url, |
| 250 bool is_favicon, | 250 bool is_favicon, |
| 251 uint32_t max_bitmap_size, | 251 uint32_t max_bitmap_size, |
| 252 bool bypass_cache, | 252 bool bypass_cache, |
| 253 const ImageDownloadCallback& callback) override; | 253 const ImageDownloadCallback& callback) override; |
| 254 shell::InterfaceRegistry* GetMojoInterfaceRegistry() override; | 254 service_manager::InterfaceRegistry* GetMojoInterfaceRegistry() override; |
| 255 base::WeakPtr<WebState> AsWeakPtr() override; | 255 base::WeakPtr<WebState> AsWeakPtr() override; |
| 256 | 256 |
| 257 // Adds |interstitial|'s view to the web controller's content view. | 257 // Adds |interstitial|'s view to the web controller's content view. |
| 258 void ShowWebInterstitial(WebInterstitialImpl* interstitial); | 258 void ShowWebInterstitial(WebInterstitialImpl* interstitial); |
| 259 | 259 |
| 260 // Called to dismiss the currently-displayed transient content view. | 260 // Called to dismiss the currently-displayed transient content view. |
| 261 void ClearTransientContentView(); | 261 void ClearTransientContentView(); |
| 262 | 262 |
| 263 // Notifies the delegate that the load progress was updated. | 263 // Notifies the delegate that the load progress was updated. |
| 264 void SendChangeLoadProgress(double progress); | 264 void SendChangeLoadProgress(double progress); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 | 359 |
| 360 // Callbacks associated to command prefixes. | 360 // Callbacks associated to command prefixes. |
| 361 std::map<std::string, ScriptCommandCallback> script_command_callbacks_; | 361 std::map<std::string, ScriptCommandCallback> script_command_callbacks_; |
| 362 | 362 |
| 363 // Member variables should appear before the WeakPtrFactory<> to ensure that | 363 // Member variables should appear before the WeakPtrFactory<> to ensure that |
| 364 // any WeakPtrs to WebStateImpl are invalidated before its member variable's | 364 // any WeakPtrs to WebStateImpl are invalidated before its member variable's |
| 365 // destructors are executed, rendering them invalid. | 365 // destructors are executed, rendering them invalid. |
| 366 base::WeakPtrFactory<WebState> weak_factory_; | 366 base::WeakPtrFactory<WebState> weak_factory_; |
| 367 | 367 |
| 368 // Mojo interface registry for this WebState. | 368 // Mojo interface registry for this WebState. |
| 369 std::unique_ptr<shell::InterfaceRegistry> mojo_interface_registry_; | 369 std::unique_ptr<service_manager::InterfaceRegistry> mojo_interface_registry_; |
| 370 | 370 |
| 371 DISALLOW_COPY_AND_ASSIGN(WebStateImpl); | 371 DISALLOW_COPY_AND_ASSIGN(WebStateImpl); |
| 372 }; | 372 }; |
| 373 | 373 |
| 374 } // namespace web | 374 } // namespace web |
| 375 | 375 |
| 376 #endif // IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_ | 376 #endif // IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_ |
| OLD | NEW |