Chromium Code Reviews| Index: chrome/browser/supervised_user/supervised_user_content_provider_android.h |
| diff --git a/chrome/browser/supervised_user/supervised_user_content_provider_android.h b/chrome/browser/supervised_user/supervised_user_content_provider_android.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9e2fd9290c6c4a8e942da1a564073515ee43429c |
| --- /dev/null |
| +++ b/chrome/browser/supervised_user/supervised_user_content_provider_android.h |
| @@ -0,0 +1,46 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_CONTENT_PROVIDER_ANDROID_H_ |
| +#define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_CONTENT_PROVIDER_ANDROID_H_ |
| + |
| +#include <jni.h> |
| +#include "base/android/scoped_java_ref.h" |
| +#include "base/macros.h" |
| +#include "base/memory/weak_ptr.h" |
| +#include "chrome/browser/supervised_user/supervised_user_url_filter.h" |
| + |
| +class SupervisedUserService; |
| + |
| +class SupervisedUserContentProvider { |
| + public: |
| + SupervisedUserContentProvider( |
| + JNIEnv* env, |
| + const base::android::JavaParamRef<jobject>& caller); |
| + virtual ~SupervisedUserContentProvider(); |
| + |
| + void ShouldProceed(JNIEnv* env, |
| + jobject caller, |
| + const base::android::JavaParamRef<jstring>& url); |
| + void RequestInsert(JNIEnv* env, |
| + jobject caller, |
| + const base::android::JavaParamRef<jstring>& url); |
| + |
| + void SetFilterForTesting(JNIEnv* env, jobject caller); |
| + |
| + private: |
| + void OnQueryComplete(SupervisedUserURLFilter::FilteringBehavior behavior, |
| + SupervisedUserURLFilter::FilteringBehaviorReason reason, |
| + bool /* uncertain */); |
| + Profile* profile_; |
| + base::android::ScopedJavaGlobalRef<jobject> java_content_provider_; |
| + |
| + base::WeakPtrFactory<SupervisedUserContentProvider> weak_factory_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(SupervisedUserContentProvider); |
| +}; |
| + |
| +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.
|
| + |
| +#endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_CONTENT_PROVIDER_ANDROID_H_ |