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

Side by Side Diff: android_webview/java/src/org/chromium/android_webview/AwContents.java

Issue 239793002: Handle media access permission request (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments, added unittests 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.android_webview; 5 package org.chromium.android_webview;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.app.Activity; 8 import android.app.Activity;
9 import android.content.ComponentCallbacks2; 9 import android.content.ComponentCallbacks2;
10 import android.content.Context; 10 import android.content.Context;
(...skipping 19 matching lines...) Expand all
30 import android.view.accessibility.AccessibilityNodeInfo; 30 import android.view.accessibility.AccessibilityNodeInfo;
31 import android.view.accessibility.AccessibilityNodeProvider; 31 import android.view.accessibility.AccessibilityNodeProvider;
32 import android.view.inputmethod.EditorInfo; 32 import android.view.inputmethod.EditorInfo;
33 import android.view.inputmethod.InputConnection; 33 import android.view.inputmethod.InputConnection;
34 import android.webkit.GeolocationPermissions; 34 import android.webkit.GeolocationPermissions;
35 import android.webkit.ValueCallback; 35 import android.webkit.ValueCallback;
36 import android.widget.OverScroller; 36 import android.widget.OverScroller;
37 37
38 import com.google.common.annotations.VisibleForTesting; 38 import com.google.common.annotations.VisibleForTesting;
39 39
40 import org.chromium.android_webview.permission.AwPermissionRequest;
40 import org.chromium.base.CalledByNative; 41 import org.chromium.base.CalledByNative;
41 import org.chromium.base.JNINamespace; 42 import org.chromium.base.JNINamespace;
42 import org.chromium.base.ThreadUtils; 43 import org.chromium.base.ThreadUtils;
43 import org.chromium.components.navigation_interception.InterceptNavigationDelega te; 44 import org.chromium.components.navigation_interception.InterceptNavigationDelega te;
44 import org.chromium.components.navigation_interception.NavigationParams; 45 import org.chromium.components.navigation_interception.NavigationParams;
45 import org.chromium.content.browser.ContentSettings; 46 import org.chromium.content.browser.ContentSettings;
46 import org.chromium.content.browser.ContentViewClient; 47 import org.chromium.content.browser.ContentViewClient;
47 import org.chromium.content.browser.ContentViewCore; 48 import org.chromium.content.browser.ContentViewCore;
48 import org.chromium.content.browser.ContentViewStatics; 49 import org.chromium.content.browser.ContentViewStatics;
49 import org.chromium.content.browser.LoadUrlParams; 50 import org.chromium.content.browser.LoadUrlParams;
(...skipping 1826 matching lines...) Expand 10 before | Expand all | Expand 10 after
1876 mContentsClient.onGeolocationPermissionsShowPrompt( 1877 mContentsClient.onGeolocationPermissionsShowPrompt(
1877 origin, new AwGeolocationCallback()); 1878 origin, new AwGeolocationCallback());
1878 } 1879 }
1879 1880
1880 @CalledByNative 1881 @CalledByNative
1881 private void onGeolocationPermissionsHidePrompt() { 1882 private void onGeolocationPermissionsHidePrompt() {
1882 mContentsClient.onGeolocationPermissionsHidePrompt(); 1883 mContentsClient.onGeolocationPermissionsHidePrompt();
1883 } 1884 }
1884 1885
1885 @CalledByNative 1886 @CalledByNative
1887 private void onPermissionRequest(AwPermissionRequest awPermissionRequest) {
1888 mContentsClient.onPermissionRequest(awPermissionRequest);
1889 }
1890
1891 @CalledByNative
1892 private void onPermissionRequestCanceled(AwPermissionRequest awPermissionReq uest) {
1893 mContentsClient.onPermissionRequestCanceled(awPermissionRequest);
1894 }
1895
1896 @CalledByNative
1886 public void onFindResultReceived(int activeMatchOrdinal, int numberOfMatches , 1897 public void onFindResultReceived(int activeMatchOrdinal, int numberOfMatches ,
1887 boolean isDoneCounting) { 1898 boolean isDoneCounting) {
1888 mContentsClient.onFindResultReceived(activeMatchOrdinal, numberOfMatches , isDoneCounting); 1899 mContentsClient.onFindResultReceived(activeMatchOrdinal, numberOfMatches , isDoneCounting);
1889 } 1900 }
1890 1901
1891 @CalledByNative 1902 @CalledByNative
1892 public void onNewPicture() { 1903 public void onNewPicture() {
1893 // Don't call capturePicture() here but instead defer it until the poste d task runs within 1904 // Don't call capturePicture() here but instead defer it until the poste d task runs within
1894 // the callback helper, to avoid doubling back into the renderer composi tor in the middle 1905 // the callback helper, to avoid doubling back into the renderer composi tor in the middle
1895 // of the notification it is sending up to here. 1906 // of the notification it is sending up to here.
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
2134 long nativeAwContents, boolean value, String requestingFrame); 2145 long nativeAwContents, boolean value, String requestingFrame);
2135 2146
2136 private native void nativeSetJsOnlineProperty(long nativeAwContents, boolean networkUp); 2147 private native void nativeSetJsOnlineProperty(long nativeAwContents, boolean networkUp);
2137 2148
2138 private native void nativeTrimMemoryOnRenderThread(long nativeAwContents, in t level, 2149 private native void nativeTrimMemoryOnRenderThread(long nativeAwContents, in t level,
2139 boolean visible); 2150 boolean visible);
2140 2151
2141 private native void nativeCreatePdfExporter(long nativeAwContents, AwPdfExpo rter awPdfExporter); 2152 private native void nativeCreatePdfExporter(long nativeAwContents, AwPdfExpo rter awPdfExporter);
2142 2153
2143 } 2154 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698