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_NTP_SNIPPETS_BRIDGE_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_ |
6 #define CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_ | 6 #define CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_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 28 matching lines...) Expand all Loading... | |
39 void DiscardSnippet(JNIEnv* env, | 39 void DiscardSnippet(JNIEnv* env, |
40 const base::android::JavaParamRef<jobject>& obj, | 40 const base::android::JavaParamRef<jobject>& obj, |
41 const base::android::JavaParamRef<jstring>& snippet_id); | 41 const base::android::JavaParamRef<jstring>& snippet_id); |
42 | 42 |
43 // Checks if the URL has been visited. | 43 // Checks if the URL has been visited. |
44 void SnippetVisited(JNIEnv* env, | 44 void SnippetVisited(JNIEnv* env, |
45 const base::android::JavaParamRef<jobject>& obj, | 45 const base::android::JavaParamRef<jobject>& obj, |
46 const base::android::JavaParamRef<jobject>& callback, | 46 const base::android::JavaParamRef<jobject>& callback, |
47 const base::android::JavaParamRef<jstring>& jurl); | 47 const base::android::JavaParamRef<jstring>& jurl); |
48 | 48 |
49 // Returns a reason why the snippet service is disabled, or 0 if it isn't. | |
50 // Possible return values: | |
51 // 0 - NONE | |
52 // 1 - EXPLICITLY_DISABLED, | |
53 // 2 - HISTORY_SYNC_DISABLED, | |
54 // 3 - HISTORY_SYNC_STATE_UNKNOWN | |
Bernhard Bauer
2016/06/14 12:10:40
I think it's fine to just refer to the definition
dgn
2016/06/15 16:46:29
Done.
| |
55 // See NTPSnippetsService::DisabledReason for more info. | |
56 int GetDisabledReason(JNIEnv* env, | |
57 const base::android::JavaParamRef<jobject>& obj); | |
58 | |
49 static bool Register(JNIEnv* env); | 59 static bool Register(JNIEnv* env); |
50 | 60 |
51 private: | 61 private: |
52 ~NTPSnippetsBridge() override; | 62 ~NTPSnippetsBridge() override; |
53 | 63 |
54 // NTPSnippetsServiceObserver overrides | 64 // NTPSnippetsServiceObserver overrides |
55 void NTPSnippetsServiceLoaded() override; | 65 void NTPSnippetsServiceLoaded() override; |
56 void NTPSnippetsServiceShutdown() override; | 66 void NTPSnippetsServiceShutdown() override; |
57 void NTPSnippetsServiceDisabled() override; | 67 void NTPSnippetsServiceDisabled() override; |
58 | 68 |
(...skipping 10 matching lines...) Expand all Loading... | |
69 ScopedObserver<ntp_snippets::NTPSnippetsService, | 79 ScopedObserver<ntp_snippets::NTPSnippetsService, |
70 ntp_snippets::NTPSnippetsServiceObserver> | 80 ntp_snippets::NTPSnippetsServiceObserver> |
71 snippet_service_observer_; | 81 snippet_service_observer_; |
72 | 82 |
73 base::WeakPtrFactory<NTPSnippetsBridge> weak_ptr_factory_; | 83 base::WeakPtrFactory<NTPSnippetsBridge> weak_ptr_factory_; |
74 | 84 |
75 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsBridge); | 85 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsBridge); |
76 }; | 86 }; |
77 | 87 |
78 #endif // CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_ | 88 #endif // CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_ |
OLD | NEW |