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.ntp; | 5 package org.chromium.chrome.browser.ntp; |
6 | 6 |
7 import org.chromium.base.annotations.CalledByNative; | 7 import org.chromium.base.annotations.CalledByNative; |
8 import org.chromium.chrome.browser.profiles.Profile; | 8 import org.chromium.chrome.browser.profiles.Profile; |
9 | 9 |
10 /** | 10 /** |
11 * Retrieve the user's interests. | 11 * Retrieve the user's interests. |
12 */ | 12 */ |
13 public class InterestsService { | 13 public class InterestsService { |
| 14 |
14 private long mNativeInterestsService; | 15 private long mNativeInterestsService; |
15 | 16 |
16 /** | 17 /** |
17 * A user's interest. | 18 * A user's interest. |
18 */ | 19 */ |
19 public static class Interest { | 20 public static class Interest { |
20 private final String mName; | 21 private final String mName; |
21 private final String mImageUrl; | 22 private final String mImageUrl; |
22 private final double mRelevance; | 23 private final double mRelevance; |
23 | 24 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 @CalledByNative | 93 @CalledByNative |
93 private static Interest[] createInterestsArray(int size) { | 94 private static Interest[] createInterestsArray(int size) { |
94 return new Interest[size]; | 95 return new Interest[size]; |
95 } | 96 } |
96 | 97 |
97 private native long nativeInit(Profile profile); | 98 private native long nativeInit(Profile profile); |
98 private native void nativeDestroy(long nativeInterestsService); | 99 private native void nativeDestroy(long nativeInterestsService); |
99 private native void nativeGetInterests( | 100 private native void nativeGetInterests( |
100 long nativeInterestsService, GetInterestsCallback callback); | 101 long nativeInterestsService, GetInterestsCallback callback); |
101 } | 102 } |
OLD | NEW |