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

Unified Diff: chrome/browser/extensions/api/tab_capture/tab_capture_event_router.h

Issue 10928043: Media Related changes for TabCapture API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initial Created 8 years, 3 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/extensions/api/tab_capture/tab_capture_event_router.h
diff --git a/chrome/browser/extensions/api/tab_capture/tab_capture_event_router.h b/chrome/browser/extensions/api/tab_capture/tab_capture_event_router.h
new file mode 100644
index 0000000000000000000000000000000000000000..8ee5a84cc56a948b8c146151a2c16dc7cf93a635
--- /dev/null
+++ b/chrome/browser/extensions/api/tab_capture/tab_capture_event_router.h
@@ -0,0 +1,39 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_EVENT_ROUTER_H_
+#define CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_EVENT_ROUTER_H_
+
+#include <vector>
+
+#include "base/string16.h"
+#include "chrome/browser/media/media_internals.h"
+#include "chrome/browser/media/media_internals_observer.h"
+#include "content/public/common/media_stream_request.h"
+
+class Profile;
+
+namespace extensions {
+
+// TODO(justinlin): This should be maybe be filtered/partitioned by extension.
+class TabCaptureEventRouter : public MediaInternalsObserver {
+ public:
+ explicit TabCaptureEventRouter(Profile* profile);
+ virtual ~TabCaptureEventRouter();
+
+ std::vector<content::MediaStreamDevice>* GetCapturedTabs();
+
+ private:
+ // MediaInternalsObserver.
+ virtual void OnRequestUpdate(
+ const content::MediaStreamDevice& device,
+ const content::MediaStreamRequest::RequestState state) OVERRIDE;
+
+ Profile* const profile_;
+ DISALLOW_COPY_AND_ASSIGN(TabCaptureEventRouter);
+};
+
+} // namespace extension
+
+#endif // CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_EVENT_ROUTER_H_

Powered by Google App Engine
This is Rietveld 408576698