| 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 #ifndef CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_ |
| 6 #define CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_ | 6 #define CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 void GetURLThumbnail(JNIEnv* env, | 40 void GetURLThumbnail(JNIEnv* env, |
| 41 jobject obj, | 41 jobject obj, |
| 42 jstring url, | 42 jstring url, |
| 43 jobject j_callback); | 43 jobject j_callback); |
| 44 void BlacklistUrl(JNIEnv* env, jobject obj, jstring j_url); | 44 void BlacklistUrl(JNIEnv* env, jobject obj, jstring j_url); |
| 45 void RecordOpenedMostVisitedItem(JNIEnv* env, jobject obj, jint index); | 45 void RecordOpenedMostVisitedItem(JNIEnv* env, jobject obj, jint index); |
| 46 | 46 |
| 47 // content::NotificationObserver implementation. | 47 // content::NotificationObserver implementation. |
| 48 virtual void Observe(int type, | 48 virtual void Observe(int type, |
| 49 const content::NotificationSource& source, | 49 const content::NotificationSource& source, |
| 50 const content::NotificationDetails& details) OVERRIDE; | 50 const content::NotificationDetails& details) override; |
| 51 | 51 |
| 52 // ProfileSyncServiceObserver implementation. | 52 // ProfileSyncServiceObserver implementation. |
| 53 virtual void OnStateChanged() OVERRIDE; | 53 virtual void OnStateChanged() override; |
| 54 | 54 |
| 55 // Registers JNI methods. | 55 // Registers JNI methods. |
| 56 static bool Register(JNIEnv* env); | 56 static bool Register(JNIEnv* env); |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 // The source of the Most Visited sites. | 59 // The source of the Most Visited sites. |
| 60 enum MostVisitedSource { | 60 enum MostVisitedSource { |
| 61 TOP_SITES, | 61 TOP_SITES, |
| 62 SUGGESTIONS_SERVICE | 62 SUGGESTIONS_SERVICE |
| 63 }; | 63 }; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 | 129 |
| 130 MostVisitedSource mv_source_; | 130 MostVisitedSource mv_source_; |
| 131 | 131 |
| 132 // For callbacks may be run after destruction. | 132 // For callbacks may be run after destruction. |
| 133 base::WeakPtrFactory<MostVisitedSites> weak_ptr_factory_; | 133 base::WeakPtrFactory<MostVisitedSites> weak_ptr_factory_; |
| 134 | 134 |
| 135 DISALLOW_COPY_AND_ASSIGN(MostVisitedSites); | 135 DISALLOW_COPY_AND_ASSIGN(MostVisitedSites); |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 #endif // CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_ | 138 #endif // CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_ |
| OLD | NEW |