Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: ios/web/web_state/web_state_impl.h

Issue 2677993002: Use IOSImageDataFetcherWrapper for favicon (Closed)
Patch Set: Add header Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 25 matching lines...) Expand all
36 } 36 }
37 37
38 namespace web { 38 namespace web {
39 39
40 class BrowserState; 40 class BrowserState;
41 struct ContextMenuParams; 41 struct ContextMenuParams;
42 struct Credential; 42 struct Credential;
43 struct FaviconURL; 43 struct FaviconURL;
44 struct LoadCommittedDetails; 44 struct LoadCommittedDetails;
45 class NavigationManager; 45 class NavigationManager;
46 class ImageDataFetcher;
47 class WebInterstitialImpl; 46 class WebInterstitialImpl;
48 class WebStateFacadeDelegate; 47 class WebStateFacadeDelegate;
49 class WebStatePolicyDecider; 48 class WebStatePolicyDecider;
50 class WebUIIOS; 49 class WebUIIOS;
51 50
52 // Implementation of WebState. 51 // Implementation of WebState.
53 // Generally mirrors //content's WebContents implementation. 52 // Generally mirrors //content's WebContents implementation.
54 // General notes on expected WebStateImpl ownership patterns: 53 // General notes on expected WebStateImpl ownership patterns:
55 // - Outside of tests, WebStateImpls are created 54 // - Outside of tests, WebStateImpls are created
56 // (a) By @Tab, when creating a new Tab. 55 // (a) By @Tab, when creating a new Tab.
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 GURL GetCurrentURL(URLVerificationTrustLevel* trust_level) const override; 220 GURL GetCurrentURL(URLVerificationTrustLevel* trust_level) const override;
222 void ShowTransientContentView(CRWContentView* content_view) override; 221 void ShowTransientContentView(CRWContentView* content_view) override;
223 bool IsShowingWebInterstitial() const override; 222 bool IsShowingWebInterstitial() const override;
224 WebInterstitial* GetWebInterstitial() const override; 223 WebInterstitial* GetWebInterstitial() const override;
225 void OnPasswordInputShownOnHttp() override; 224 void OnPasswordInputShownOnHttp() override;
226 void OnCreditCardInputShownOnHttp() override; 225 void OnCreditCardInputShownOnHttp() override;
227 void AddScriptCommandCallback(const ScriptCommandCallback& callback, 226 void AddScriptCommandCallback(const ScriptCommandCallback& callback,
228 const std::string& command_prefix) override; 227 const std::string& command_prefix) override;
229 void RemoveScriptCommandCallback(const std::string& command_prefix) override; 228 void RemoveScriptCommandCallback(const std::string& command_prefix) override;
230 id<CRWWebViewProxy> GetWebViewProxy() const override; 229 id<CRWWebViewProxy> GetWebViewProxy() const override;
231 int DownloadImage(const GURL& url,
232 bool is_favicon,
233 uint32_t max_bitmap_size,
234 bool bypass_cache,
235 const ImageDownloadCallback& callback) override;
236 service_manager::InterfaceRegistry* GetMojoInterfaceRegistry() override; 230 service_manager::InterfaceRegistry* GetMojoInterfaceRegistry() override;
237 base::WeakPtr<WebState> AsWeakPtr() override; 231 base::WeakPtr<WebState> AsWeakPtr() override;
238 232
239 // Adds |interstitial|'s view to the web controller's content view. 233 // Adds |interstitial|'s view to the web controller's content view.
240 void ShowWebInterstitial(WebInterstitialImpl* interstitial); 234 void ShowWebInterstitial(WebInterstitialImpl* interstitial);
241 235
242 // Called to dismiss the currently-displayed transient content view. 236 // Called to dismiss the currently-displayed transient content view.
243 void ClearTransientContentView(); 237 void ClearTransientContentView();
244 238
245 // Notifies the delegate that the load progress was updated. 239 // Notifies the delegate that the load progress was updated.
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 std::map<std::string, ScriptCommandCallback> script_command_callbacks_; 339 std::map<std::string, ScriptCommandCallback> script_command_callbacks_;
346 340
347 // Member variables should appear before the WeakPtrFactory<> to ensure that 341 // Member variables should appear before the WeakPtrFactory<> to ensure that
348 // any WeakPtrs to WebStateImpl are invalidated before its member variable's 342 // any WeakPtrs to WebStateImpl are invalidated before its member variable's
349 // destructors are executed, rendering them invalid. 343 // destructors are executed, rendering them invalid.
350 base::WeakPtrFactory<WebState> weak_factory_; 344 base::WeakPtrFactory<WebState> weak_factory_;
351 345
352 // Mojo interface registry for this WebState. 346 // Mojo interface registry for this WebState.
353 std::unique_ptr<service_manager::InterfaceRegistry> mojo_interface_registry_; 347 std::unique_ptr<service_manager::InterfaceRegistry> mojo_interface_registry_;
354 348
355 // Image Fetcher used to images.
356 std::unique_ptr<ImageDataFetcher> image_fetcher_;
357
358 DISALLOW_COPY_AND_ASSIGN(WebStateImpl); 349 DISALLOW_COPY_AND_ASSIGN(WebStateImpl);
359 }; 350 };
360 351
361 } // namespace web 352 } // namespace web
362 353
363 #endif // IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_ 354 #endif // IOS_WEB_WEB_STATE_WEB_STATE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698