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

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

Issue 11236052: Indicate tab recording state in tab strip (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Always add capture devices Created 8 years, 2 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/media/media_internals.cc ('k') | chrome/browser/media/media_stream_capture_indicator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4232ddcee8d2e7689773dcf84b4dc0794c235c9f..6132f86443750672b5bd60a401ebfef549461cd9 100644
--- a/chrome/browser/media/media_stream_capture_indicator.h
+++ b/chrome/browser/media/media_stream_capture_indicator.h
@@ -8,7 +8,6 @@
#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"
@@ -20,12 +19,11 @@ class StatusTray;
// This indicator is owned by MediaInternals and deleted when MediaInternals
// is deleted.
-class MediaStreamCaptureIndicator
- : public base::RefCountedThreadSafe<MediaStreamCaptureIndicator>,
- public ui::SimpleMenuModel::Delegate,
- public ImageLoadingTracker::Observer {
+class 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;
@@ -45,6 +43,9 @@ class MediaStreamCaptureIndicator
int render_view_id,
const content::MediaStreamDevices& devices);
+ // 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,
@@ -82,9 +83,6 @@ class MediaStreamCaptureIndicator
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,
@@ -151,6 +149,10 @@ class MediaStreamCaptureIndicator
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_
« no previous file with comments | « chrome/browser/media/media_internals.cc ('k') | chrome/browser/media/media_stream_capture_indicator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698