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

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

Issue 1095393004: Refactor: Make MediaCaptureDevicesDispatcher have pluggable handlers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 5 years, 8 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/media/media_access_handler.h
diff --git a/chrome/browser/media/media_access_handler.h b/chrome/browser/media/media_access_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..d3d89658240a60e8c8491a7a7ee9aa0ef9397b9f
--- /dev/null
+++ b/chrome/browser/media/media_access_handler.h
@@ -0,0 +1,38 @@
+// Copyright 2015 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_MEDIA_MEDIA_ACCESS_HANDLER_H_
+#define CHROME_BROWSER_MEDIA_MEDIA_ACCESS_HANDLER_H_
+
+#include <deque>
+#include <map>
Sergey Ulanov 2015/05/07 01:05:48 remove these two includes. They are not used in th
changbin 2015/05/22 05:10:58 Done.
+
+#include "base/callback.h"
+#include "base/memory/scoped_ptr.h"
Sergey Ulanov 2015/05/07 01:05:48 Remove these two includes.
changbin 2015/05/22 05:10:58 content::MediaResponseCallback is actually base::C
+#include "content/public/common/media_stream_request.h"
+
+namespace content {
+class WebContents;
+}
+
+namespace extensions {
+class Extension;
+}
+
+// Interface for handling media access requests that are propagated from
+// MediaCaptureDevicesDispatcher.
+class MediaAccessHandler {
+ public:
+ MediaAccessHandler() {}
+ virtual ~MediaAccessHandler() {}
+
+ virtual bool SupportsRequest(const content::MediaStreamRequest& request,
+ const extensions::Extension* extension) = 0;
+ virtual void HandleRequest(content::WebContents* web_contents,
+ const content::MediaStreamRequest& request,
+ const content::MediaResponseCallback& callback,
+ const extensions::Extension* extension) = 0;
+};
+
+#endif // CHROME_BROWSER_MEDIA_MEDIA_ACCESS_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698