| 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 6132f86443750672b5bd60a401ebfef549461cd9..6b6becc94ca9c9672583ed9cf06f09d3b1696795 100644
|
| --- a/chrome/browser/media/media_stream_capture_indicator.h
|
| +++ b/chrome/browser/media/media_stream_capture_indicator.h
|
| @@ -8,6 +8,7 @@
|
| #include <string>
|
| #include <vector>
|
|
|
| +#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"
|
| @@ -19,11 +20,12 @@ class StatusTray;
|
|
|
| // This indicator is owned by MediaInternals and deleted when MediaInternals
|
| // is deleted.
|
| -class MediaStreamCaptureIndicator : public ui::SimpleMenuModel::Delegate,
|
| - public ImageLoadingTracker::Observer {
|
| +class MediaStreamCaptureIndicator
|
| + : public base::RefCountedThreadSafe<MediaStreamCaptureIndicator>,
|
| + public ui::SimpleMenuModel::Delegate,
|
| + public ImageLoadingTracker::Observer {
|
| public:
|
| MediaStreamCaptureIndicator();
|
| - virtual ~MediaStreamCaptureIndicator();
|
|
|
| // Overrides from SimpleMenuModel::Delegate implementation.
|
| virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
|
| @@ -83,6 +85,9 @@ class MediaStreamCaptureIndicator : public ui::SimpleMenuModel::Delegate,
|
| int render_view_id_;
|
| };
|
|
|
| + friend class base::RefCountedThreadSafe<MediaStreamCaptureIndicator>;
|
| + virtual ~MediaStreamCaptureIndicator();
|
| +
|
| // Called by the public functions, executed on UI thread.
|
| void DoDevicesOpenedOnUIThread(int render_process_id,
|
| int render_view_id,
|
| @@ -149,10 +154,6 @@ class MediaStreamCaptureIndicator : public ui::SimpleMenuModel::Delegate,
|
| std::map<int, string16> pending_messages_;
|
| // Tracks the number of requests to |tracker_|.
|
| int request_index_;
|
| -
|
| - base::WeakPtrFactory<MediaStreamCaptureIndicator> weak_ptr_factory_;
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(MediaStreamCaptureIndicator);
|
| };
|
|
|
| #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_CAPTURE_INDICATOR_H_
|
|
|