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

Unified Diff: content/public/browser/web_contents_delegate.h

Issue 10542092: Refactor the content interface for RequestMediaAccessPermission. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clean up Created 8 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
Index: content/public/browser/web_contents_delegate.h
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index 6c3b6f8198fcc99e88a8ed31b310be0b455b44ff..ea536570ec81bfd458f012422ab11ce14625c5f2 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -10,9 +10,11 @@
#include <string>
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/string16.h"
#include "content/common/content_export.h"
#include "content/public/browser/navigation_type.h"
+#include "content/public/common/media_stream_request.h"
#include "content/public/common/page_transition_types.h"
#include "content/public/common/window_container_type.h"
#include "third_party/skia/include/core/SkColor.h"
@@ -407,12 +409,21 @@ class CONTENT_EXPORT WebContentsDelegate {
// contents.
virtual void RequestToLockMouse(WebContents* web_contents,
bool user_gesture,
- bool last_unlocked_by_target) {
- }
+ bool last_unlocked_by_target) {}
// Notification that the page has lost the mouse lock.
virtual void LostMouseLock() {}
+ // Asks permission to use the camera and/or microphone. If permission is
+ // granted, a call should be made to |callback| with the devices. If the
+ // request is denied, a call should be made to |callback| with an empty list
+ // of devices. |request| has the details of the request (e.g. which of audio
+ // and/or video devices are requested, and lists of available devices).
+ virtual void RequestMediaAccessPermission(
+ WebContents* web_contents,
+ const MediaStreamRequest* request,
+ const MediaResponseCallback& callback) {}
+
protected:
virtual ~WebContentsDelegate();

Powered by Google App Engine
This is Rietveld 408576698