OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
hartmanng
2017/01/13 15:40:21
s/(c) 2012/2017/
gonzalon
2017/01/13 20:24:39
Done.
| |
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 "base/macros.h" | |
9 #include "base/memory/weak_ptr.h" | |
10 #include "base/values.h" | |
11 #include "content/public/browser/web_ui_message_handler.h" | |
12 | |
13 // Handler class for WebAPKs page operations. | |
14 class WebAPKsHandler : public content::WebUIMessageHandler { | |
15 public: | |
16 WebAPKsHandler(); | |
17 ~WebAPKsHandler() override; | |
18 | |
19 // content::WebUIMessageHandler implementation. | |
20 void RegisterMessages() override; | |
21 | |
22 // Callback for the "requestWebAPKsInfo" message. This requests the Web APKs | |
23 // information from the device and returns it to the front end using | |
24 // OnWebApkInfoReceived | |
25 virtual void HandleRequestWebAPKsInfo(const base::ListValue* args); | |
26 | |
27 private: | |
28 // Callback which handles returning the information of a single Web APK to the | |
29 // front end. | |
30 void OnWebApkInfoReceived(std::string name, | |
31 std::string package_name, | |
32 int shell_apk_version, | |
33 int version_code); | |
34 | |
35 // Factory for the creating refs in callbacks. | |
36 base::WeakPtrFactory<WebAPKsHandler> weak_ptr_factory_; | |
37 | |
38 DISALLOW_COPY_AND_ASSIGN(WebAPKsHandler); | |
39 }; | |
40 | |
41 #endif // CHROME_BROWSER_UI_WEBUI_WEBAPKS_HANDLER_H_ | |
OLD | NEW |