OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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.chrome.browser.favicon; | 5 package org.chromium.chrome.browser.favicon; |
6 | 6 |
7 import android.graphics.Bitmap; | 7 import android.graphics.Bitmap; |
8 | 8 |
9 import org.chromium.base.CalledByNative; | 9 import org.chromium.base.annotations.CalledByNative; |
10 import org.chromium.chrome.browser.profiles.Profile; | 10 import org.chromium.chrome.browser.profiles.Profile; |
11 | 11 |
12 /** | 12 /** |
13 * A Java API for using the C++ LargeIconService. | 13 * A Java API for using the C++ LargeIconService. |
14 * | 14 * |
15 * An instance of this class must be created, used, and destroyed on the same th
read. | 15 * An instance of this class must be created, used, and destroyed on the same th
read. |
16 */ | 16 */ |
17 public class LargeIconBridge { | 17 public class LargeIconBridge { |
18 | 18 |
19 private long mNativeLargeIconBridge; | 19 private long mNativeLargeIconBridge; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 assert mNativeLargeIconBridge != 0; | 66 assert mNativeLargeIconBridge != 0; |
67 return nativeGetLargeIconForURL(mNativeLargeIconBridge, profile, pageUrl
, | 67 return nativeGetLargeIconForURL(mNativeLargeIconBridge, profile, pageUrl
, |
68 desiredSizePx, callback); | 68 desiredSizePx, callback); |
69 } | 69 } |
70 | 70 |
71 private static native long nativeInit(); | 71 private static native long nativeInit(); |
72 private static native void nativeDestroy(long nativeLargeIconBridge); | 72 private static native void nativeDestroy(long nativeLargeIconBridge); |
73 private static native boolean nativeGetLargeIconForURL(long nativeLargeIconB
ridge, | 73 private static native boolean nativeGetLargeIconForURL(long nativeLargeIconB
ridge, |
74 Profile profile, String pageUrl, int desiredSizePx, LargeIconCallbac
k callback); | 74 Profile profile, String pageUrl, int desiredSizePx, LargeIconCallbac
k callback); |
75 } | 75 } |
OLD | NEW |