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

Unified Diff: content/renderer/media/media_stream_dispatcher.h

Issue 18420011: Support cancellation of request for opening device. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: add IsThisRequest method and some comments Created 7 years, 6 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 | « no previous file | content/renderer/media/media_stream_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/media_stream_dispatcher.h
===================================================================
--- content/renderer/media/media_stream_dispatcher.h (revision 209718)
+++ content/renderer/media/media_stream_dispatcher.h (working copy)
@@ -48,7 +48,9 @@
const GURL& security_origin);
// Cancel the request for a new media stream to be created.
- virtual void CancelGenerateStream(int request_id);
+ virtual void CancelGenerateStream(
+ int request_id,
+ const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler);
// Stop a started stream. Label is the label provided in OnStreamGenerated.
virtual void StopStream(const std::string& label);
@@ -73,6 +75,11 @@
MediaStreamType type,
const GURL& security_origin);
+ // Cancel the request to open a device.
+ virtual void CancelOpenDevice(
+ int request_id,
+ const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler);
+
// Close a started device. |label| is provided in OnDeviceOpened.
void CloseDevice(const std::string& label);
@@ -97,11 +104,17 @@
// opened it.
struct Stream;
+ // An enumeration request is identified by pair (request_id, handler).
+ // It allows multiple clients to make requests and each client could have
+ // its own request_id sequence.
struct EnumerationRequest {
EnumerationRequest(
const base::WeakPtr<MediaStreamDispatcherEventHandler>& handler,
int request_id);
~EnumerationRequest();
+ bool IsThisRequest(
+ int request_id,
+ const base::WeakPtr<MediaStreamDispatcherEventHandler>& handler);
base::WeakPtr<MediaStreamDispatcherEventHandler> handler;
int request_id;
« no previous file with comments | « no previous file | content/renderer/media/media_stream_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698