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..5fc03dae9570d2033e997fb83af663670b2f5e52 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" |
@@ -60,6 +62,8 @@ namespace content { |
struct OpenURLParams; |
+typedef base::Callback< void(const MediaStreamDevices&) > MediaResponseCallback; |
+ |
// Objects implement this interface to get notified about changes in the |
// WebContents and to provide necessary functionality. |
class CONTENT_EXPORT WebContentsDelegate { |
@@ -407,12 +411,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(); |