Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Side by Side Diff: chrome/browser/android/webapps/webapp_registry.h

Issue 2629573004: Add a chrome://webapks page. (Closed)
Patch Set: Adds an about:webapks page with information about all installed Web APKs on the device Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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_WEBAPPS_WEBAPP_REGISTRY_H_ 5 #ifndef CHROME_BROWSER_ANDROID_WEBAPPS_WEBAPP_REGISTRY_H_
6 #define CHROME_BROWSER_ANDROID_WEBAPPS_WEBAPP_REGISTRY_H_ 6 #define CHROME_BROWSER_ANDROID_WEBAPPS_WEBAPP_REGISTRY_H_
7 7
8 #include <string>
9
8 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 12
11 class GURL; 13 class GURL;
12 14
13 // WebappRegistry is the C++ counterpart of 15 // WebappRegistry is the C++ counterpart of
14 // org.chromium.chrome.browser.webapp's WebappRegistry in Java. 16 // org.chromium.chrome.browser.webapp's WebappRegistry in Java.
15 // All methods in this class which make JNI calls should be declared virtual and 17 // 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 18 // mocked out in C++ unit tests. The JNI call cannot be made in this environment
17 // as the Java side will not be initialised. 19 // as the Java side will not be initialised.
18 class WebappRegistry { 20 class WebappRegistry {
19 public: 21 public:
20 WebappRegistry() { } 22 WebappRegistry() { }
21 virtual ~WebappRegistry() { } 23 virtual ~WebappRegistry() { }
22 24
23 // Cleans up data stored by web apps on URLs matching |url_filter|. 25 // Cleans up data stored by web apps on URLs matching |url_filter|.
24 virtual void UnregisterWebappsForUrls( 26 virtual void UnregisterWebappsForUrls(
25 const base::Callback<bool(const GURL&)>& url_filter); 27 const base::Callback<bool(const GURL&)>& url_filter);
26 28
27 // Removes history data (last used time and URLs) stored by web apps with 29 // Removes history data (last used time and URLs) stored by web apps with
28 // URLs matching |url_filter|, whilst leaving other data intact. 30 // URLs matching |url_filter|, whilst leaving other data intact.
29 virtual void ClearWebappHistoryForUrls( 31 virtual void ClearWebappHistoryForUrls(
30 const base::Callback<bool(const GURL&)>& url_filter); 32 const base::Callback<bool(const GURL&)>& url_filter);
31 33
34 // Fetches a list of the Web APKs installed in the device, including their
35 // package name and version info.
36 virtual void ListWebAPKs(
37 const base::RepeatingCallback<void(std::string, std::string, int, int)>&
38 callback);
39
32 private: 40 private:
33 DISALLOW_COPY_AND_ASSIGN(WebappRegistry); 41 DISALLOW_COPY_AND_ASSIGN(WebappRegistry);
34 }; 42 };
35 43
36 #endif // CHROME_BROWSER_ANDROID_WEBAPPS_WEBAPP_REGISTRY_H_ 44 #endif // CHROME_BROWSER_ANDROID_WEBAPPS_WEBAPP_REGISTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698