OLD | NEW |
(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_ANDROID_WEBAPK_WEBAPK_INFO_H_ |
| 6 #define CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INFO_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/macros.h" |
| 11 |
| 12 // Structure with information about a WebAPK. |
| 13 // |
| 14 // This class is passed around in a std::vector to generate the chrome://webapks |
| 15 // page. To reduce copying overhead, this class is move-only, and |
| 16 // move-constructs its string arguments (which are copied from Java to C++ into |
| 17 // a temporary prior to construction). |
| 18 struct WebApkInfo { |
| 19 WebApkInfo(std::string short_name, |
| 20 std::string package_name, |
| 21 int shell_apk_version, |
| 22 int version_code); |
| 23 ~WebApkInfo(); |
| 24 |
| 25 WebApkInfo& operator=(WebApkInfo&& other) = default; |
| 26 WebApkInfo(WebApkInfo&& other) = default; |
| 27 |
| 28 // Short name of the WebAPK. |
| 29 std::string short_name; |
| 30 |
| 31 // Package name of the WebAPK. |
| 32 std::string package_name; |
| 33 |
| 34 // Shell APK version of the WebAPK. |
| 35 int shell_apk_version; |
| 36 |
| 37 // Version code of the WebAPK. |
| 38 int version_code; |
| 39 |
| 40 private: |
| 41 DISALLOW_COPY_AND_ASSIGN(WebApkInfo); |
| 42 }; |
| 43 |
| 44 #endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INFO_H_ |
OLD | NEW |