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

Unified Diff: android_webview/native/aw_contents.h

Issue 239793002: Handle media access permission request (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 6 years, 8 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: android_webview/native/aw_contents.h
diff --git a/android_webview/native/aw_contents.h b/android_webview/native/aw_contents.h
index acae8938c7e2794598a51631fae73820a7501313..da64aa7b8d946f27d609ac677b9a770371fc0897 100644
--- a/android_webview/native/aw_contents.h
+++ b/android_webview/native/aw_contents.h
@@ -16,6 +16,7 @@
#include "android_webview/browser/icon_helper.h"
#include "android_webview/browser/renderer_host/aw_render_view_host_ext.h"
#include "android_webview/browser/shared_renderer_state.h"
+#include "android_webview/native/permission/permission_request_handler_client.h"
#include "base/android/scoped_java_ref.h"
#include "base/android/jni_helper.h"
#include "base/callback_forward.h"
@@ -36,6 +37,7 @@ class AwContentsClientBridge;
class AwPdfExporter;
class AwWebContentsDelegate;
class HardwareRenderer;
+class PermissionRequestHandler;
// Native side of java-class of same name.
// Provides the ownership of and access to browser components required for
@@ -53,7 +55,8 @@ class HardwareRenderer;
class AwContents : public FindHelper::Listener,
public IconHelper::Listener,
public AwRenderViewHostExtClient,
- public BrowserViewRendererClient {
+ public BrowserViewRendererClient,
+ public PermissionRequestHandlerClient {
public:
// Returns the AwContents instance associated with |web_contents|, or NULL.
static AwContents* FromWebContents(content::WebContents* web_contents);
@@ -137,6 +140,16 @@ class AwContents : public FindHelper::Listener,
jboolean value,
jstring origin);
+ // PermissionRequestHandlerClient implementation.
+ virtual void OnPermissionRequest(
+ scoped_refptr<AwPermissionRequest> request) OVERRIDE;
+ virtual void OnPermissionRequestCanceled(
+ scoped_refptr<AwPermissionRequest> request) OVERRIDE;
+
+ PermissionRequestHandler* GetPermissionRequestHandler() {
+ return permission_request_handler_.get();
+ }
+
// Find-in-page API and related methods.
void FindAllAsync(JNIEnv* env, jobject obj, jstring search_string);
void FindNext(JNIEnv* env, jobject obj, jboolean forward);
@@ -220,6 +233,7 @@ class AwContents : public FindHelper::Listener,
BrowserViewRenderer browser_view_renderer_;
scoped_ptr<HardwareRenderer> hardware_renderer_;
scoped_ptr<AwPdfExporter> pdf_exporter_;
+ scoped_ptr<PermissionRequestHandler> permission_request_handler_;
// GURL is supplied by the content layer as requesting frame.
// Callback is supplied by the content layer, and is invoked with the result

Powered by Google App Engine
This is Rietveld 408576698