OLD | NEW |
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.Color; | 10 import android.graphics.Color; |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 mPossiblyStaleHitTestData = new HitTestData(); | 300 mPossiblyStaleHitTestData = new HitTestData(); |
301 nativeDidInitializeContentViewCore(mNativeAwContents, | 301 nativeDidInitializeContentViewCore(mNativeAwContents, |
302 mContentViewCore.getNativeContentViewCore()); | 302 mContentViewCore.getNativeContentViewCore()); |
303 | 303 |
304 mDIPScale = DeviceDisplayInfo.create(containerView.getContext()).getDIPS
cale(); | 304 mDIPScale = DeviceDisplayInfo.create(containerView.getContext()).getDIPS
cale(); |
305 mContentsClient.setDIPScale(mDIPScale); | 305 mContentsClient.setDIPScale(mDIPScale); |
306 mSettings.setDIPScale(mDIPScale); | 306 mSettings.setDIPScale(mDIPScale); |
307 mDefaultVideoPosterRequestHandler = new DefaultVideoPosterRequestHandler
(mContentsClient); | 307 mDefaultVideoPosterRequestHandler = new DefaultVideoPosterRequestHandler
(mContentsClient); |
308 mContentViewCore.getContentSettings().setDefaultVideoPosterURL( | 308 mContentViewCore.getContentSettings().setDefaultVideoPosterURL( |
309 mDefaultVideoPosterRequestHandler.getDefaultVideoPosterURL()); | 309 mDefaultVideoPosterRequestHandler.getDefaultVideoPosterURL()); |
310 | |
311 ContentVideoView.registerContentVideoViewContextDelegate( | |
312 new AwContentVideoViewDelegate(contentsClient, containerView.get
Context())); | |
313 } | 310 } |
314 | 311 |
315 // TODO(mkosiba): Remove this once we move the embedding layer to use method
s on AwContents. | 312 // TODO(mkosiba): Remove this once we move the embedding layer to use method
s on AwContents. |
316 public ContentViewCore getContentViewCore() { | 313 public ContentViewCore getContentViewCore() { |
317 return mContentViewCore; | 314 return mContentViewCore; |
318 } | 315 } |
319 | 316 |
320 // Can be called from any thread. | 317 // Can be called from any thread. |
321 public AwSettings getSettings() { | 318 public AwSettings getSettings() { |
322 return mSettings; | 319 return mSettings; |
(...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1372 private native boolean nativeDrawSW(int nativeAwContents, Canvas canvas, int
clipX, int clipY, | 1369 private native boolean nativeDrawSW(int nativeAwContents, Canvas canvas, int
clipX, int clipY, |
1373 int clipW, int clipH); | 1370 int clipW, int clipH); |
1374 private native int nativeGetAwDrawGLViewContext(int nativeAwContents); | 1371 private native int nativeGetAwDrawGLViewContext(int nativeAwContents); |
1375 private native Picture nativeCapturePicture(int nativeAwContents); | 1372 private native Picture nativeCapturePicture(int nativeAwContents); |
1376 private native void nativeEnableOnNewPicture(int nativeAwContents, boolean e
nabled, | 1373 private native void nativeEnableOnNewPicture(int nativeAwContents, boolean e
nabled, |
1377 boolean invalidationOnly); | 1374 boolean invalidationOnly); |
1378 | 1375 |
1379 private native void nativeInvokeGeolocationCallback( | 1376 private native void nativeInvokeGeolocationCallback( |
1380 int nativeAwContents, boolean value, String requestingFrame); | 1377 int nativeAwContents, boolean value, String requestingFrame); |
1381 } | 1378 } |
OLD | NEW |