OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_COMMON_WEB_APPS_H_ | 5 #ifndef CHROME_COMMON_WEB_APPS_H_ |
6 #define CHROME_COMMON_WEB_APPS_H_ | 6 #define CHROME_COMMON_WEB_APPS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // The permissions the app requests. Only supported with manifest-based apps. | 68 // The permissions the app requests. Only supported with manifest-based apps. |
69 std::vector<std::string> permissions; | 69 std::vector<std::string> permissions; |
70 | 70 |
71 // Set of URLs that comprise the app. Only supported with manifest-based apps. | 71 // Set of URLs that comprise the app. Only supported with manifest-based apps. |
72 // All these must be of the same origin as manifest_url. | 72 // All these must be of the same origin as manifest_url. |
73 std::vector<GURL> urls; | 73 std::vector<GURL> urls; |
74 | 74 |
75 // The type of launch container to use with the app. Currently supported | 75 // The type of launch container to use with the app. Currently supported |
76 // values are 'tab' and 'panel'. Only supported with manifest-based apps. | 76 // values are 'tab' and 'panel'. Only supported with manifest-based apps. |
77 std::string launch_container; | 77 std::string launch_container; |
| 78 |
| 79 // This indicates if the app is functional in offline mode or not. |
| 80 bool is_offline_enabled; |
78 }; | 81 }; |
79 | 82 |
80 | 83 |
81 namespace web_apps { | 84 namespace web_apps { |
82 | 85 |
83 // Parses an icon size. An icon size must match the following regex: | 86 // Parses an icon size. An icon size must match the following regex: |
84 // [1-9][0-9]*x[1-9][0-9]*. | 87 // [1-9][0-9]*x[1-9][0-9]*. |
85 // If the input couldn't be parsed, a size with a width/height == 0 is returned. | 88 // If the input couldn't be parsed, a size with a width/height == 0 is returned. |
86 gfx::Size ParseIconSize(const string16& text); | 89 gfx::Size ParseIconSize(const string16& text); |
87 | 90 |
(...skipping 21 matching lines...) Expand all Loading... |
109 // Parses |web_app| information out of |definition|. Returns true on success, or | 112 // Parses |web_app| information out of |definition|. Returns true on success, or |
110 // false and |error| on failure. This function assumes that |web_app| has a | 113 // false and |error| on failure. This function assumes that |web_app| has a |
111 // valid manifest_url. | 114 // valid manifest_url. |
112 bool ParseWebAppFromDefinitionFile(base::Value* definition, | 115 bool ParseWebAppFromDefinitionFile(base::Value* definition, |
113 WebApplicationInfo* web_app, | 116 WebApplicationInfo* web_app, |
114 string16* error); | 117 string16* error); |
115 | 118 |
116 } // namespace web_apps | 119 } // namespace web_apps |
117 | 120 |
118 #endif // CHROME_COMMON_WEB_APPS_H_ | 121 #endif // CHROME_COMMON_WEB_APPS_H_ |
OLD | NEW |