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

Side by Side Diff: chrome/browser/ui/webui/webapks_handler.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
(Empty)
1 // Copyright (c) 2017 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_UI_WEBUI_WEBAPKS_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_WEBAPKS_HANDLER_H_
7
8 #include <vector>
9
10 #include "base/macros.h"
11 #include "base/memory/weak_ptr.h"
12 #include "base/values.h"
13 #include "chrome/browser/android/webapk/webapk_info.h"
14 #include "content/public/browser/web_ui_message_handler.h"
15
16 // Handles JavaScript messages from the chrome://webapks page.
17 class WebApksHandler : public content::WebUIMessageHandler {
18 public:
19 WebApksHandler();
20 ~WebApksHandler() override;
21
22 // content::WebUIMessageHandler implementation.
pkotwicz 2017/01/20 16:57:17 Nit: "content::WebUIMessageHandler implementation.
gonzalon 2017/01/20 19:27:01 Done.
23 void RegisterMessages() override;
24
25 // Handler for the "requestWebApksInfo" message. This requests
26 // information for the installed WebAPKs and returns it to JS using
27 // OnWebApkInfoReceived().
28 virtual void HandleRequestWebApksInfo(const base::ListValue* args);
29
30 private:
31 // Sends information for the installed WebAPKs to JS.
32 void OnWebApkInfoReceived(std::vector<const WebApkInfo> webapks_list);
33
34 // Factory for the creating refs in callbacks.
35 base::WeakPtrFactory<WebApksHandler> weak_ptr_factory_;
36
37 DISALLOW_COPY_AND_ASSIGN(WebApksHandler);
38 };
39
40 #endif // CHROME_BROWSER_UI_WEBUI_WEBAPKS_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698