OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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.content.browser.webcontents; | 5 package org.chromium.content.browser.webcontents; |
6 | 6 |
7 import android.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
8 import android.graphics.Bitmap; | 8 import android.graphics.Bitmap; |
9 import android.graphics.Rect; | 9 import android.graphics.Rect; |
10 import android.os.Bundle; | 10 import android.os.Bundle; |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 @Override | 365 @Override |
366 public int getThemeColor() { | 366 public int getThemeColor() { |
367 return nativeGetThemeColor(mNativeWebContentsAndroid); | 367 return nativeGetThemeColor(mNativeWebContentsAndroid); |
368 } | 368 } |
369 | 369 |
370 @Override | 370 @Override |
371 public void requestAccessibilitySnapshot(AccessibilitySnapshotCallback callb
ack) { | 371 public void requestAccessibilitySnapshot(AccessibilitySnapshotCallback callb
ack) { |
372 nativeRequestAccessibilitySnapshot(mNativeWebContentsAndroid, callback); | 372 nativeRequestAccessibilitySnapshot(mNativeWebContentsAndroid, callback); |
373 } | 373 } |
374 | 374 |
375 @Override | |
376 public void resumeMediaSession() { | |
377 nativeResumeMediaSession(mNativeWebContentsAndroid); | |
378 } | |
379 | |
380 @Override | |
381 public void suspendMediaSession() { | |
382 nativeSuspendMediaSession(mNativeWebContentsAndroid); | |
383 } | |
384 | |
385 @Override | |
386 public void stopMediaSession() { | |
387 nativeStopMediaSession(mNativeWebContentsAndroid); | |
388 } | |
389 | |
390 // root node can be null if parsing fails. | 375 // root node can be null if parsing fails. |
391 @CalledByNative | 376 @CalledByNative |
392 private static void onAccessibilitySnapshot(AccessibilitySnapshotNode root, | 377 private static void onAccessibilitySnapshot(AccessibilitySnapshotNode root, |
393 AccessibilitySnapshotCallback callback) { | 378 AccessibilitySnapshotCallback callback) { |
394 callback.onAccessibilitySnapshot(root); | 379 callback.onAccessibilitySnapshot(root); |
395 } | 380 } |
396 | 381 |
397 @CalledByNative | 382 @CalledByNative |
398 private static void addAccessibilityNodeAsChild(AccessibilitySnapshotNode pa
rent, | 383 private static void addAccessibilityNodeAsChild(AccessibilitySnapshotNode pa
rent, |
399 AccessibilitySnapshotNode child) { | 384 AccessibilitySnapshotNode child) { |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 long nativeWebContentsAndroid, int level, String message); | 525 long nativeWebContentsAndroid, int level, String message); |
541 private native void nativePostMessageToFrame(long nativeWebContentsAndroid,
String frameName, | 526 private native void nativePostMessageToFrame(long nativeWebContentsAndroid,
String frameName, |
542 String message, String targetOrigin, int[] sentPortIds); | 527 String message, String targetOrigin, int[] sentPortIds); |
543 private native void nativeCreateMessageChannel( | 528 private native void nativeCreateMessageChannel( |
544 long nativeWebContentsAndroid, AppWebMessagePort[] ports); | 529 long nativeWebContentsAndroid, AppWebMessagePort[] ports); |
545 private native boolean nativeHasAccessedInitialDocument( | 530 private native boolean nativeHasAccessedInitialDocument( |
546 long nativeWebContentsAndroid); | 531 long nativeWebContentsAndroid); |
547 private native int nativeGetThemeColor(long nativeWebContentsAndroid); | 532 private native int nativeGetThemeColor(long nativeWebContentsAndroid); |
548 private native void nativeRequestAccessibilitySnapshot( | 533 private native void nativeRequestAccessibilitySnapshot( |
549 long nativeWebContentsAndroid, AccessibilitySnapshotCallback callbac
k); | 534 long nativeWebContentsAndroid, AccessibilitySnapshotCallback callbac
k); |
550 private native void nativeResumeMediaSession(long nativeWebContentsAndroid); | |
551 private native void nativeSuspendMediaSession(long nativeWebContentsAndroid)
; | |
552 private native void nativeStopMediaSession(long nativeWebContentsAndroid); | |
553 private native void nativeGetContentBitmap(long nativeWebContentsAndroid, | 535 private native void nativeGetContentBitmap(long nativeWebContentsAndroid, |
554 ContentBitmapCallback callback, Bitmap.Config config, float scale, | 536 ContentBitmapCallback callback, Bitmap.Config config, float scale, |
555 float x, float y, float width, float height); | 537 float x, float y, float width, float height); |
556 private native void nativeReloadLoFiImages(long nativeWebContentsAndroid); | 538 private native void nativeReloadLoFiImages(long nativeWebContentsAndroid); |
557 private native int nativeDownloadImage(long nativeWebContentsAndroid, | 539 private native int nativeDownloadImage(long nativeWebContentsAndroid, |
558 String url, boolean isFavicon, int maxBitmapSize, | 540 String url, boolean isFavicon, int maxBitmapSize, |
559 boolean bypassCache, ImageDownloadCallback callback); | 541 boolean bypassCache, ImageDownloadCallback callback); |
560 } | 542 } |
OLD | NEW |