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

Unified Diff: chrome/browser/media/media_stream_capture_indicator.h

Issue 11027044: Add a class to replace ImageLoadingTracker with a nicer API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix include order Created 8 years, 1 month 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/media/media_stream_capture_indicator.h
diff --git a/chrome/browser/media/media_stream_capture_indicator.h b/chrome/browser/media/media_stream_capture_indicator.h
index 6b6becc94ca9c9672583ed9cf06f09d3b1696795..8696f917bf917ba67790149365f6ff644dbba697 100644
--- a/chrome/browser/media/media_stream_capture_indicator.h
+++ b/chrome/browser/media/media_stream_capture_indicator.h
@@ -10,7 +10,6 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
-#include "chrome/browser/extensions/image_loading_tracker.h"
#include "content/public/common/media_stream_request.h"
#include "ui/base/models/simple_menu_model.h"
#include "ui/gfx/image/image_skia.h"
@@ -22,8 +21,7 @@ class StatusTray;
// is deleted.
class MediaStreamCaptureIndicator
: public base::RefCountedThreadSafe<MediaStreamCaptureIndicator>,
- public ui::SimpleMenuModel::Delegate,
- public ImageLoadingTracker::Observer {
+ public ui::SimpleMenuModel::Delegate {
public:
MediaStreamCaptureIndicator();
@@ -48,10 +46,8 @@ class MediaStreamCaptureIndicator
// Returns true if the render process is capturing media.
bool IsProcessCapturing(int render_process_id, int render_view_id) const;
- // ImageLoadingTracker::Observer implementation.
- virtual void OnImageLoaded(const gfx::Image& image,
- const std::string& extension_id,
- int index) OVERRIDE;
+ // ImageLoader callback.
+ void OnImageLoaded(const string16& message, const gfx::Image& image);
private:
// Struct to store the usage information of the capture devices for each tab.
@@ -131,9 +127,6 @@ class MediaStreamCaptureIndicator
// UpdateStatusTrayIconContextMenu().
void UpdateStatusTrayIconDisplay(bool audio, bool video);
- // Initializes image loading state.
- void EnsureImageLoadingTracker();
-
// Reference to our status icon - owned by the StatusTray. If null,
// the platform doesn't support status icons.
StatusIcon* status_icon_;
@@ -147,13 +140,7 @@ class MediaStreamCaptureIndicator
typedef std::vector<CaptureDeviceTab> CaptureDeviceTabs;
CaptureDeviceTabs tabs_;
- // Tracks the load of extension icons.
- scoped_ptr<ImageLoadingTracker> tracker_;
- // The messages to display when extension images are loaded. The index
- // corresponds to the index of the associated LoadImage request.
- std::map<int, string16> pending_messages_;
- // Tracks the number of requests to |tracker_|.
- int request_index_;
+ bool should_show_balloon_;
};
#endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_CAPTURE_INDICATOR_H_

Powered by Google App Engine
This is Rietveld 408576698