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

Unified Diff: chrome/browser/ui/panels/panel.h

Issue 11886029: Use ImageLoader instead of ImageLoadingTracker (Part 9) (Closed) Base URL: https://git.chromium.org/chromium/src.git@Issue_163929
Patch Set: 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
Index: chrome/browser/ui/panels/panel.h
diff --git a/chrome/browser/ui/panels/panel.h b/chrome/browser/ui/panels/panel.h
index 70c9c39c3a5eda87a5ef4c904b9021b8579937b4..2cb7e7b724993172d3a2883049f3b4d4e779424c 100644
--- a/chrome/browser/ui/panels/panel.h
+++ b/chrome/browser/ui/panels/panel.h
@@ -9,10 +9,10 @@
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "base/string16.h"
#include "chrome/browser/command_updater.h"
#include "chrome/browser/command_updater_delegate.h"
-#include "chrome/browser/extensions/image_loading_tracker.h"
#include "chrome/browser/sessions/session_id.h"
#include "chrome/browser/ui/base_window.h"
#include "chrome/browser/ui/panels/panel_constants.h"
@@ -49,8 +49,7 @@ class WindowController;
// other Panels. For example deleting a panel would rearrange other panels.
class Panel : public BaseWindow,
public CommandUpdaterDelegate,
- public content::NotificationObserver,
- public ImageLoadingTracker::Observer {
+ public content::NotificationObserver {
public:
enum ExpansionState {
// The panel is fully expanded with both title-bar and the client-area.
@@ -314,10 +313,7 @@ class Panel : public BaseWindow,
CUSTOM_MAX_SIZE
};
- // ImageLoadingTracker::Observer implementation.
- virtual void OnImageLoaded(const gfx::Image& image,
- const std::string& extension_id,
- int index) OVERRIDE;
+ void OnImageLoaded(const gfx::Image& image);
// Initialize state for all supported commands.
void InitCommandState();
@@ -384,12 +380,11 @@ class Panel : public BaseWindow,
scoped_ptr<extensions::WindowController> extension_window_controller_;
scoped_ptr<PanelHost> panel_host_;
- // Used for loading app_icon_.
- scoped_ptr<ImageLoadingTracker> app_icon_loader_;
-
// Icon showed in the task bar.
gfx::Image app_icon_;
+ base::WeakPtrFactory<Panel> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(Panel);
};

Powered by Google App Engine
This is Rietveld 408576698