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 ed7aca7c4ce03e2f4c16976c556d9f3d31c2b778..bd95987bcaa0e5ed089ee4bfd99d4f28f7690cde 100644 |
--- a/chrome/browser/media/media_stream_capture_indicator.h |
+++ b/chrome/browser/media/media_stream_capture_indicator.h |
@@ -9,6 +9,7 @@ |
#include <vector> |
#include "base/memory/ref_counted.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" |
@@ -20,7 +21,8 @@ class StatusTray; |
// is deleted. |
class MediaStreamCaptureIndicator |
: public base::RefCountedThreadSafe<MediaStreamCaptureIndicator>, |
- public ui::SimpleMenuModel::Delegate { |
+ public ui::SimpleMenuModel::Delegate, |
+ public ImageLoadingTracker::Observer { |
public: |
MediaStreamCaptureIndicator(); |
@@ -42,8 +44,15 @@ class MediaStreamCaptureIndicator |
int render_view_id, |
const content::MediaStreamDevices& devices); |
+ // ImageLoadingTracker::Observer implementation. |
+ virtual void OnImageLoaded(const gfx::Image& image, |
+ const std::string& extension_id, |
+ int index) OVERRIDE; |
+ |
private: |
// Struct to store the usage information of the capture devices for each tab. |
+ // TODO(estade): this should be called CaptureDeviceContents; not all the |
+ // render views it represents are tabs. |
struct CaptureDeviceTab { |
CaptureDeviceTab(int render_process_id, |
int render_view_id) |
@@ -103,19 +112,12 @@ class MediaStreamCaptureIndicator |
// Triggers a balloon in the corner telling capture devices are being used. |
// This function is called by AddCaptureDeviceTab(). |
void ShowBalloon(int render_process_id, int render_view_id, |
- bool audio, bool video) const; |
+ bool audio, bool video); |
// Hides the status tray from the desktop. This function is called by |
// RemoveCaptureDeviceTab() when the device usage list becomes empty. |
void Hide(); |
- // Gets the title of the tab. |
- string16 GetTitle(int render_process_id, int render_view_id) const; |
- |
- // Gets the security originator of the tab. It returns a string with no '/' |
- // at the end to display in the UI. |
- string16 GetSecurityOrigin(int render_process_id, int render_view_id) const; |
- |
// Updates the status tray menu with the new device list. This call will be |
// triggered by both AddCaptureDeviceTab() and RemoveCaptureDeviceTab(). |
void UpdateStatusTrayIconContextMenu(); |
@@ -137,6 +139,12 @@ class MediaStreamCaptureIndicator |
// A list that contains the usage information of the opened capture devices. |
typedef std::vector<CaptureDeviceTab> CaptureDeviceTabs; |
CaptureDeviceTabs tabs_; |
+ |
+ // Tracks the load of extension icons. |
+ ImageLoadingTracker tracker_; |
+ // The messages to display when extension images are loaded. The index |
+ // corresponds to the index of the associated LoadImage request. |
+ std::vector<string16> pending_messages_; |
}; |
#endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_CAPTURE_INDICATOR_H_ |