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

Unified Diff: extensions/browser/guest_view/app_view/app_view_guest.h

Issue 820583002: Adds support for media permission request handling on <appview> tag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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: extensions/browser/guest_view/app_view/app_view_guest.h
diff --git a/extensions/browser/guest_view/app_view/app_view_guest.h b/extensions/browser/guest_view/app_view/app_view_guest.h
index abe4e0eb61703e2ddff43ebf60bdd466bc9490dd..f19e4790df12f91ad7349ae5aba2201b28508deb 100644
--- a/extensions/browser/guest_view/app_view/app_view_guest.h
+++ b/extensions/browser/guest_view/app_view/app_view_guest.h
@@ -44,6 +44,13 @@ class AppViewGuest : public GuestView<AppViewGuest>,
// content::WebContentsDelegate implementation.
bool HandleContextMenu(const content::ContextMenuParams& params) override;
+ void RequestMediaAccessPermission(
+ content::WebContents* web_contents,
+ const content::MediaStreamRequest& request,
+ const content::MediaResponseCallback& callback) override;
+ bool CheckMediaAccessPermission(content::WebContents* web_contents,
+ const GURL& security_origin,
+ content::MediaStreamType type) override;
// GuestViewBase implementation.
const char* GetAPINamespace() const override;
@@ -53,6 +60,9 @@ class AppViewGuest : public GuestView<AppViewGuest>,
void DidAttachToEmbedder() override;
void DidInitialize() override;
+ // Sets the AppDelegate for this guest.
+ void SetAppDelegateForTest(AppDelegate* delegate);
+
private:
AppViewGuest(content::BrowserContext* browser_context,
content::WebContents* owner_web_contents,
@@ -74,6 +84,7 @@ class AppViewGuest : public GuestView<AppViewGuest>,
std::string guest_extension_id_;
scoped_ptr<ExtensionFunctionDispatcher> extension_function_dispatcher_;
scoped_ptr<AppViewGuestDelegate> app_view_guest_delegate_;
+ scoped_ptr<AppDelegate> app_delegate_;
// This is used to ensure pending tasks will not fire after this object is
// destroyed.

Powered by Google App Engine
This is Rietveld 408576698