| 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_ANDROID_WEBAPPS_WEBAPP_REGISTRY_H_ | |
| 6 #define CHROME_BROWSER_ANDROID_WEBAPPS_WEBAPP_REGISTRY_H_ | |
| 7 | |
| 8 #include "base/android/jni_android.h" | |
| 9 #include "base/android/scoped_java_ref.h" | |
| 10 #include "base/callback_forward.h" | |
| 11 #include "base/macros.h" | |
| 12 | |
| 13 // WebappRegistry is the C++ counterpart of | |
| 14 // org.chromium.chrome.browser.webapp's WebappRegistry in Java. | |
| 15 // All methods in this class which make JNI calls should be declared virtual and | |
| 16 // mocked out in C++ unit tests. The JNI call cannot be made in this environment | |
| 17 // as the Java side will not be initialised. | |
| 18 class WebappRegistry { | |
| 19 public: | |
| 20 WebappRegistry() { } | |
| 21 virtual ~WebappRegistry() { } | |
| 22 | |
| 23 // Registers JNI hooks. | |
| 24 static bool RegisterWebappRegistry(JNIEnv* env); | |
| 25 | |
| 26 // Cleans up data stored by web apps. | |
| 27 virtual void UnregisterWebapps(const base::Closure& callback); | |
| 28 | |
| 29 // Removes history data (last used time and URLs) stored by web apps, whilst | |
| 30 // leaving other data intact. | |
| 31 virtual void ClearWebappHistory(const base::Closure& callback); | |
| 32 | |
| 33 private: | |
| 34 DISALLOW_COPY_AND_ASSIGN(WebappRegistry); | |
| 35 }; | |
| 36 | |
| 37 #endif // CHROME_BROWSER_ANDROID_WEBAPPS_WEBAPP_REGISTRY_H_ | |
| OLD | NEW |