OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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> |
11 | 11 |
12 #include "base/string16.h" | 12 #include "base/string16.h" |
13 #include "googleurl/src/gurl.h" | 13 #include "googleurl/src/gurl.h" |
14 #include "third_party/skia/include/core/SkBitmap.h" | 14 #include "third_party/skia/include/core/SkBitmap.h" |
15 #include "ui/gfx/size.h" | 15 #include "ui/gfx/size.h" |
16 | 16 |
17 namespace WebKit { | 17 namespace WebKit { |
18 class WebDocument; | 18 class WebDocument; |
19 class WebFrame; | 19 class WebFrame; |
20 } | 20 } |
21 | 21 |
| 22 namespace base { |
22 class Value; | 23 class Value; |
| 24 } |
23 | 25 |
24 // Structure used when installing a web page as an app. | 26 // Structure used when installing a web page as an app. |
25 struct WebApplicationInfo { | 27 struct WebApplicationInfo { |
26 struct IconInfo { | 28 struct IconInfo { |
27 GURL url; | 29 GURL url; |
28 int width; | 30 int width; |
29 int height; | 31 int height; |
30 SkBitmap data; | 32 SkBitmap data; |
31 }; | 33 }; |
32 | 34 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 // web_app will have manifest_url set and nothing else. The caller must fetch | 95 // web_app will have manifest_url set and nothing else. The caller must fetch |
94 // this URL and pass the result to ParseWebAppFromDefinitionFile() for further | 96 // this URL and pass the result to ParseWebAppFromDefinitionFile() for further |
95 // processing. | 97 // processing. |
96 bool ParseWebAppFromWebDocument(WebKit::WebFrame* frame, | 98 bool ParseWebAppFromWebDocument(WebKit::WebFrame* frame, |
97 WebApplicationInfo* web_app, | 99 WebApplicationInfo* web_app, |
98 string16* error); | 100 string16* error); |
99 | 101 |
100 // Parses |web_app| information out of |definition|. Returns true on success, or | 102 // Parses |web_app| information out of |definition|. Returns true on success, or |
101 // false and |error| on failure. This function assumes that |web_app| has a | 103 // false and |error| on failure. This function assumes that |web_app| has a |
102 // valid manifest_url. | 104 // valid manifest_url. |
103 bool ParseWebAppFromDefinitionFile(Value* definition, | 105 bool ParseWebAppFromDefinitionFile(base::Value* definition, |
104 WebApplicationInfo* web_app, | 106 WebApplicationInfo* web_app, |
105 string16* error); | 107 string16* error); |
106 | 108 |
107 } // namespace web_apps | 109 } // namespace web_apps |
108 | 110 |
109 #endif // CHROME_COMMON_WEB_APPS_H_ | 111 #endif // CHROME_COMMON_WEB_APPS_H_ |
OLD | NEW |