summaryrefslogtreecommitdiffstats
path: root/chromium/content/browser/renderer_host/media/media_stream_ui_proxy.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/browser/renderer_host/media/media_stream_ui_proxy.h')
-rw-r--r--chromium/content/browser/renderer_host/media/media_stream_ui_proxy.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/chromium/content/browser/renderer_host/media/media_stream_ui_proxy.h b/chromium/content/browser/renderer_host/media/media_stream_ui_proxy.h
index 62bbeb84495..01be16676cd 100644
--- a/chromium/content/browser/renderer_host/media/media_stream_ui_proxy.h
+++ b/chromium/content/browser/renderer_host/media/media_stream_ui_proxy.h
@@ -21,7 +21,11 @@ class RenderViewHostDelegate;
class CONTENT_EXPORT MediaStreamUIProxy {
public:
typedef base::Callback<
- void (const MediaStreamDevices& devices)> ResponseCallback;
+ void (const MediaStreamDevices& devices,
+ content::MediaStreamRequestResult result)>
+ ResponseCallback;
+
+ typedef base::Callback<void(gfx::NativeViewId window_id)> WindowIdCallback;
static scoped_ptr<MediaStreamUIProxy> Create();
static scoped_ptr<MediaStreamUIProxy> CreateForTests(
@@ -39,8 +43,10 @@ class CONTENT_EXPORT MediaStreamUIProxy {
// Notifies the UI that the MediaStream has been started. Must be called after
// access has been approved using RequestAccess(). |stop_callback| is be
// called on the IO thread after the user has requests the stream to be
- // stopped.
- virtual void OnStarted(const base::Closure& stop_callback);
+ // stopped. |window_id_callback| is called on the IO thread with the platform-
+ // dependent window ID of the UI.
+ virtual void OnStarted(const base::Closure& stop_callback,
+ const WindowIdCallback& window_id_callback);
void SetRenderViewHostDelegateForTests(RenderViewHostDelegate* delegate);
@@ -52,8 +58,12 @@ class CONTENT_EXPORT MediaStreamUIProxy {
friend class Core;
friend class FakeMediaStreamUIProxy;
- void ProcessAccessRequestResponse(const MediaStreamDevices& devices);
+ void ProcessAccessRequestResponse(
+ const MediaStreamDevices& devices,
+ content::MediaStreamRequestResult result);
void ProcessStopRequestFromUI();
+ void OnWindowId(const WindowIdCallback& window_id_callback,
+ gfx::NativeViewId* window_id);
scoped_ptr<Core> core_;
ResponseCallback response_callback_;
@@ -75,7 +85,8 @@ class CONTENT_EXPORT FakeMediaStreamUIProxy : public MediaStreamUIProxy {
virtual void RequestAccess(
const MediaStreamRequest& request,
const ResponseCallback& response_callback) OVERRIDE;
- virtual void OnStarted(const base::Closure& stop_callback) OVERRIDE;
+ virtual void OnStarted(const base::Closure& stop_callback,
+ const WindowIdCallback& window_id_callback) OVERRIDE;
private:
MediaStreamDevices devices_;