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

Side by Side Diff: chrome/browser/ui/webui/webapks_handler.h

Issue 2629573004: Add a chrome://webapks page. (Closed)
Patch Set: Add a chrome://webapks page. Created 3 years, 10 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 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 "chrome/browser/android/webapk/webapk_info.h"
13 #include "content/public/browser/web_ui_message_handler.h"
14
15 namespace base {
16 class ListValue;
17 } // namespace base
18
19 // Handles JavaScript messages from the chrome://webapks page.
20 class WebApksHandler : public content::WebUIMessageHandler {
21 public:
22 WebApksHandler();
23 ~WebApksHandler() override;
24
25 // content::WebUIMessageHandler:
26 void RegisterMessages() override;
27
28 // Handler for the "requestWebApksInfo" message. This requests
29 // information for the installed WebAPKs and returns it to JS using
30 // OnWebApkInfoReceived().
31 virtual void HandleRequestWebApksInfo(const base::ListValue* args);
32
33 private:
34 // Sends information for the installed WebAPKs to JS.
35 void OnWebApkInfoRetrieved(const std::vector<WebApkInfo>& webapks_list);
36
37 // Factory for the creating refs in callbacks.
38 base::WeakPtrFactory<WebApksHandler> weak_ptr_factory_;
39
40 DISALLOW_COPY_AND_ASSIGN(WebApksHandler);
41 };
42
43 #endif // CHROME_BROWSER_UI_WEBUI_WEBAPKS_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc ('k') | chrome/browser/ui/webui/webapks_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698