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

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

Issue 52463004: Block media loading when AwSettings.setBlockNetworkLoads is true. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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.content.ComponentCallbacks2; 7 import android.content.ComponentCallbacks2;
8 import android.content.Context; 8 import android.content.Context;
9 import android.content.pm.PackageManager; 9 import android.content.pm.PackageManager;
10 import android.content.res.Configuration; 10 import android.content.res.Configuration;
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 // bind all the native->java relationships. 582 // bind all the native->java relationships.
583 mCleanupReference = new CleanupReference(this, new DestroyRunnable(mNati veAwContents)); 583 mCleanupReference = new CleanupReference(this, new DestroyRunnable(mNati veAwContents));
584 584
585 int nativeWebContents = nativeGetWebContents(mNativeAwContents); 585 int nativeWebContents = nativeGetWebContents(mNativeAwContents);
586 mContentViewCore = createAndInitializeContentViewCore( 586 mContentViewCore = createAndInitializeContentViewCore(
587 mContainerView, mInternalAccessAdapter, nativeWebContents, 587 mContainerView, mInternalAccessAdapter, nativeWebContents,
588 new AwGestureStateListener(), mContentsClient.getContentViewClie nt(), 588 new AwGestureStateListener(), mContentsClient.getContentViewClie nt(),
589 mZoomControls); 589 mZoomControls);
590 nativeSetJavaPeers(mNativeAwContents, this, mWebContentsDelegate, mConte ntsClientBridge, 590 nativeSetJavaPeers(mNativeAwContents, this, mWebContentsDelegate, mConte ntsClientBridge,
591 mIoThreadClient, mInterceptNavigationDelegate); 591 mIoThreadClient, mInterceptNavigationDelegate);
592 mContentsClient.installWebContentsObserver(mContentViewCore); 592 mContentsClient.installWebContentsObserver(mContentViewCore, mSettings);
593 mSettings.setWebContents(nativeWebContents); 593 mSettings.setWebContents(nativeWebContents);
594 nativeSetDipScale(mNativeAwContents, (float) mDIPScale); 594 nativeSetDipScale(mNativeAwContents, (float) mDIPScale);
595 updateGlobalVisibleRect(); 595 updateGlobalVisibleRect();
596 596
597 // The only call to onShow. onHide should never be called. 597 // The only call to onShow. onHide should never be called.
598 mContentViewCore.onShow(); 598 mContentViewCore.onShow();
599 } 599 }
600 600
601 /** 601 /**
602 * Called on the "source" AwContents that is opening the popup window to 602 * Called on the "source" AwContents that is opening the popup window to
(...skipping 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after
2061 private native int nativeCapturePicture(int nativeAwContents, int width, int height); 2061 private native int nativeCapturePicture(int nativeAwContents, int width, int height);
2062 private native void nativeEnableOnNewPicture(int nativeAwContents, boolean e nabled); 2062 private native void nativeEnableOnNewPicture(int nativeAwContents, boolean e nabled);
2063 2063
2064 private native void nativeInvokeGeolocationCallback( 2064 private native void nativeInvokeGeolocationCallback(
2065 int nativeAwContents, boolean value, String requestingFrame); 2065 int nativeAwContents, boolean value, String requestingFrame);
2066 2066
2067 private native void nativeSetJsOnlineProperty(int nativeAwContents, boolean networkUp); 2067 private native void nativeSetJsOnlineProperty(int nativeAwContents, boolean networkUp);
2068 2068
2069 private native void nativeTrimMemory(int nativeAwContents, int level); 2069 private native void nativeTrimMemory(int nativeAwContents, int level);
2070 } 2070 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698