OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef CHROME_BROWSER_ANDROID_NTP_MOST_VISITED_SITES_BRIDGE_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_NTP_MOST_VISITED_SITES_BRIDGE_H_ |
6 #define CHROME_BROWSER_ANDROID_NTP_MOST_VISITED_SITES_BRIDGE_H_ | 6 #define CHROME_BROWSER_ANDROID_NTP_MOST_VISITED_SITES_BRIDGE_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 jboolean add_url); | 40 jboolean add_url); |
41 void RecordTileTypeMetrics( | 41 void RecordTileTypeMetrics( |
42 JNIEnv* env, | 42 JNIEnv* env, |
43 const base::android::JavaParamRef<jobject>& obj, | 43 const base::android::JavaParamRef<jobject>& obj, |
44 const base::android::JavaParamRef<jintArray>& jtile_types, | 44 const base::android::JavaParamRef<jintArray>& jtile_types, |
45 const base::android::JavaParamRef<jintArray>& jsources); | 45 const base::android::JavaParamRef<jintArray>& jsources); |
46 void RecordOpenedMostVisitedItem( | 46 void RecordOpenedMostVisitedItem( |
47 JNIEnv* env, | 47 JNIEnv* env, |
48 const base::android::JavaParamRef<jobject>& obj, | 48 const base::android::JavaParamRef<jobject>& obj, |
49 jint index, | 49 jint index, |
50 jint tile_type); | 50 jint tile_type, |
| 51 jint source); |
51 | 52 |
52 // Registers JNI methods. | 53 // Registers JNI methods. |
53 static bool Register(JNIEnv* env); | 54 static bool Register(JNIEnv* env); |
54 | 55 |
55 private: | 56 private: |
56 ~MostVisitedSitesBridge(); | 57 ~MostVisitedSitesBridge(); |
57 | 58 |
58 class JavaObserver; | 59 class JavaObserver; |
59 std::unique_ptr<JavaObserver> java_observer_; | 60 std::unique_ptr<JavaObserver> java_observer_; |
60 | 61 |
(...skipping 18 matching lines...) Expand all Loading... |
79 register_observer_; | 80 register_observer_; |
80 }; | 81 }; |
81 SupervisorBridge supervisor_; | 82 SupervisorBridge supervisor_; |
82 | 83 |
83 ntp_tiles::MostVisitedSites most_visited_; | 84 ntp_tiles::MostVisitedSites most_visited_; |
84 | 85 |
85 DISALLOW_COPY_AND_ASSIGN(MostVisitedSitesBridge); | 86 DISALLOW_COPY_AND_ASSIGN(MostVisitedSitesBridge); |
86 }; | 87 }; |
87 | 88 |
88 #endif // CHROME_BROWSER_ANDROID_NTP_MOST_VISITED_SITES_BRIDGE_H_ | 89 #endif // CHROME_BROWSER_ANDROID_NTP_MOST_VISITED_SITES_BRIDGE_H_ |
OLD | NEW |