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

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

Issue 11280284: onShowCustomView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: actually using it .... Created 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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.res.Configuration; 7 import android.content.res.Configuration;
8 import android.graphics.Bitmap; 8 import android.graphics.Bitmap;
9 import android.graphics.Canvas; 9 import android.graphics.Canvas;
10 import android.graphics.Rect; 10 import android.graphics.Rect;
11 import android.net.http.SslCertificate; 11 import android.net.http.SslCertificate;
12 import android.os.AsyncTask; 12 import android.os.AsyncTask;
13 import android.os.Build; 13 import android.os.Build;
14 import android.os.Bundle; 14 import android.os.Bundle;
15 import android.os.Handler; 15 import android.os.Handler;
16 import android.os.Looper; 16 import android.os.Looper;
17 import android.os.Message; 17 import android.os.Message;
18 import android.text.TextUtils; 18 import android.text.TextUtils;
19 import android.util.Log; 19 import android.util.Log;
20 import android.view.MotionEvent; 20 import android.view.MotionEvent;
21 import android.view.View; 21 import android.view.View;
22 import android.view.ViewGroup; 22 import android.view.ViewGroup;
23 import android.webkit.ValueCallback; 23 import android.webkit.ValueCallback;
24 24
25 import org.chromium.base.CalledByNative; 25 import org.chromium.base.CalledByNative;
26 import org.chromium.base.JNINamespace; 26 import org.chromium.base.JNINamespace;
27 import org.chromium.base.ThreadUtils; 27 import org.chromium.base.ThreadUtils;
28 import org.chromium.content.browser.ContentVideoView;
28 import org.chromium.content.browser.ContentViewCore; 29 import org.chromium.content.browser.ContentViewCore;
29 import org.chromium.content.browser.LoadUrlParams; 30 import org.chromium.content.browser.LoadUrlParams;
30 import org.chromium.content.browser.NavigationHistory; 31 import org.chromium.content.browser.NavigationHistory;
31 import org.chromium.content.common.CleanupReference; 32 import org.chromium.content.common.CleanupReference;
32 import org.chromium.content.components.navigation_interception.InterceptNavigati onDelegate; 33 import org.chromium.content.components.navigation_interception.InterceptNavigati onDelegate;
33 import org.chromium.net.X509Util; 34 import org.chromium.net.X509Util;
34 import org.chromium.ui.gfx.NativeWindow; 35 import org.chromium.ui.gfx.NativeWindow;
35 36
36 import java.io.File; 37 import java.io.File;
37 import java.net.MalformedURLException; 38 import java.net.MalformedURLException;
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 mContentViewCore.setContentViewClient(contentsClient); 239 mContentViewCore.setContentViewClient(contentsClient);
239 mContentsClient.installWebContentsObserver(mContentViewCore); 240 mContentsClient.installWebContentsObserver(mContentViewCore);
240 241
241 mSettings = new AwSettings(mContentViewCore.getContext()); 242 mSettings = new AwSettings(mContentViewCore.getContext());
242 setIoThreadClient(new IoThreadClientImpl()); 243 setIoThreadClient(new IoThreadClientImpl());
243 setInterceptNavigationDelegate(new InterceptNavigationDelegateImpl()); 244 setInterceptNavigationDelegate(new InterceptNavigationDelegateImpl());
244 245
245 mPossiblyStaleHitTestData = new HitTestData(); 246 mPossiblyStaleHitTestData = new HitTestData();
246 nativeDidInitializeContentViewCore(mNativeAwContents, 247 nativeDidInitializeContentViewCore(mNativeAwContents,
247 mContentViewCore.getNativeContentViewCore()); 248 mContentViewCore.getNativeContentViewCore());
249
250 ContentVideoView.registerContentVideoViewContextDelegate(
251 new AwContentVideoViewDelegate(contentsClient, containerView.get Context()));
joth 2012/12/08 00:17:58 There's one AwContents per WebView, and many can e
acleung 2013/01/07 23:40:03 Ya. I don't even know what happens if there are mu
248 } 252 }
249 253
250 public ContentViewCore getContentViewCore() { 254 public ContentViewCore getContentViewCore() {
251 return mContentViewCore; 255 return mContentViewCore;
252 } 256 }
253 257
254 // Can be called from any thread. 258 // Can be called from any thread.
255 public AwSettings getSettings() { 259 public AwSettings getSettings() {
256 return mSettings; 260 return mSettings;
257 } 261 }
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 boolean viewVisible); 813 boolean viewVisible);
810 private native void nativeOnAttachedToWindow(int nativeAwContents, int w, in t h); 814 private native void nativeOnAttachedToWindow(int nativeAwContents, int w, in t h);
811 private native void nativeOnDetachedFromWindow(int nativeAwContents); 815 private native void nativeOnDetachedFromWindow(int nativeAwContents);
812 816
813 // Returns null if save state fails. 817 // Returns null if save state fails.
814 private native byte[] nativeGetOpaqueState(int nativeAwContents); 818 private native byte[] nativeGetOpaqueState(int nativeAwContents);
815 819
816 // Returns false if restore state fails. 820 // Returns false if restore state fails.
817 private native boolean nativeRestoreFromOpaqueState(int nativeAwContents, by te[] state); 821 private native boolean nativeRestoreFromOpaqueState(int nativeAwContents, by te[] state);
818 } 822 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698