OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_CONTENT_PROVIDER_ANDROID_ H_ | |
6 #define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_CONTENT_PROVIDER_ANDROID_ H_ | |
7 | |
8 #include <jni.h> | |
9 #include "base/android/scoped_java_ref.h" | |
10 #include "base/macros.h" | |
11 #include "base/memory/weak_ptr.h" | |
12 #include "chrome/browser/supervised_user/supervised_user_url_filter.h" | |
13 | |
14 class SupervisedUserService; | |
15 | |
16 class SupervisedUserContentProvider { | |
17 public: | |
18 SupervisedUserContentProvider( | |
19 JNIEnv* env, | |
20 const base::android::JavaParamRef<jobject>& caller); | |
21 virtual ~SupervisedUserContentProvider(); | |
22 | |
23 void ShouldProceed(JNIEnv* env, | |
24 jobject caller, | |
25 const base::android::JavaParamRef<jstring>& url); | |
26 void RequestInsert(JNIEnv* env, | |
27 jobject caller, | |
28 const base::android::JavaParamRef<jstring>& url); | |
29 | |
30 void SetFilterForTesting(JNIEnv* env, jobject caller); | |
31 | |
32 private: | |
33 void OnQueryComplete(SupervisedUserURLFilter::FilteringBehavior behavior, | |
34 SupervisedUserURLFilter::FilteringBehaviorReason reason, | |
35 bool /* uncertain */); | |
36 Profile* profile_; | |
37 base::android::ScopedJavaGlobalRef<jobject> java_content_provider_; | |
38 | |
39 base::WeakPtrFactory<SupervisedUserContentProvider> weak_factory_; | |
40 | |
41 DISALLOW_COPY_AND_ASSIGN(SupervisedUserContentProvider); | |
42 }; | |
43 | |
44 bool RegisterSupervisedUserContentProvider(JNIEnv* env); | |
Bernhard Bauer
2015/12/14 17:58:38
Make this a static method on SupervisedUserContent
aberent
2015/12/16 15:20:37
Done.
| |
45 | |
46 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_CONTENT_PROVIDER_ANDRO ID_H_ | |
OLD | NEW |