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

Unified Diff: chrome/browser/extensions/tab_helper.h

Issue 11886073: Use ImageLoader instead of ImageLoadingTracker (Part 12) (Closed) Base URL: https://git.chromium.org/chromium/src.git@Issue_163929
Patch Set: Address code review feedback Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/image_loading_tracker.h ('k') | chrome/browser/extensions/tab_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/tab_helper.h
diff --git a/chrome/browser/extensions/tab_helper.h b/chrome/browser/extensions/tab_helper.h
index 0228adc8a4f6cf4fd5f8742d8a4c4e7e7dbefa45..8e3e00e22176b3d87731b874edc05fe2020c3a56 100644
--- a/chrome/browser/extensions/tab_helper.h
+++ b/chrome/browser/extensions/tab_helper.h
@@ -37,7 +37,6 @@ class ScriptExecutor;
// Per-tab extension helper. Also handles non-extension apps.
class TabHelper : public content::WebContentsObserver,
public ExtensionFunctionDispatcher::Delegate,
- public ImageLoadingTracker::Observer,
public AppNotifyChannelSetup::Delegate,
public base::SupportsWeakPtr<TabHelper>,
public content::NotificationObserver,
@@ -200,13 +199,9 @@ class TabHelper : public content::WebContentsObserver,
// ImageLoadingTracker to load the extension's image.
void UpdateExtensionAppIcon(const Extension* extension);
- const Extension* GetExtension(
- const std::string& extension_app_id);
+ const Extension* GetExtension(const std::string& extension_app_id);
- // ImageLoadingTracker::Observer.
- virtual void OnImageLoaded(const gfx::Image& image,
- const std::string& extension_id,
- int index) OVERRIDE;
+ void OnImageLoaded(const gfx::Image& image);
// WebstoreStandaloneInstaller::Callback.
virtual void OnInlineInstallComplete(int install_id,
@@ -247,9 +242,6 @@ class TabHelper : public content::WebContentsObserver,
// Process any extension messages coming from the tab.
ExtensionFunctionDispatcher extension_function_dispatcher_;
- // Used for loading extension_app_icon_.
- scoped_ptr<ImageLoadingTracker> extension_app_image_loader_;
-
// Cached web app info data.
WebApplicationInfo web_app_info_;
@@ -269,6 +261,9 @@ class TabHelper : public content::WebContentsObserver,
Profile* profile_;
+ // Vend weak pointers that can be invalidated to stop in-progress loads.
+ base::WeakPtrFactory<TabHelper> image_loader_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(TabHelper);
};
« no previous file with comments | « chrome/browser/extensions/image_loading_tracker.h ('k') | chrome/browser/extensions/tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698