summaryrefslogtreecommitdiffstats
path: root/webkit/glue/dom_operations.h
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue/dom_operations.h')
-rw-r--r--webkit/glue/dom_operations.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/webkit/glue/dom_operations.h b/webkit/glue/dom_operations.h
index 924878f..951eb0f 100644
--- a/webkit/glue/dom_operations.h
+++ b/webkit/glue/dom_operations.h
@@ -8,6 +8,7 @@
#include <string>
#include <vector>
+#include "gfx/size.h"
#include "googleurl/src/gurl.h"
namespace WebKit {
@@ -53,6 +54,48 @@ bool GetAllSavableResourceLinksForCurrentPage(WebKit::WebView* view,
const GURL& page_url, SavableResourcesResult* savable_resources_result,
const char** savable_schemes);
+// Structure used when installing a web page as an app. Populated via
+// GetApplicationInfo.
+struct WebApplicationInfo {
+ WebApplicationInfo();
+ ~WebApplicationInfo();
+
+ struct IconInfo {
+ GURL url;
+ int width;
+ int height;
+ };
+
+ // Title of the application. This is set from the meta tag whose name is
+ // 'application-name'.
+ string16 title;
+
+ // Description of the application. This is set from the meta tag whose name
+ // is 'description'.
+ string16 description;
+
+ // URL for the app. This is set from the meta tag whose name is
+ // 'application-url'.
+ GURL app_url;
+
+ // Set of available icons. This is set for all link tags whose rel=icon. Only
+ // icons that have a non-zero (width and/or height) are added.
+ std::vector<IconInfo> icons;
+};
+
+// Parses the icon's size attribute as defined in the HTML 5 spec. Returns true
+// on success, false on errors. On success either all the sizes specified in
+// the attribute are added to sizes, or is_any is set to true.
+//
+// You shouldn't have a need to invoke this directly, it's public for testing.
+bool ParseIconSizes(const string16& text,
+ std::vector<gfx::Size>* sizes,
+ bool* is_any);
+
+// Gets the application info for the specified page. See the description of
+// WebApplicationInfo for details as to where each field comes from.
+void GetApplicationInfo(WebKit::WebView* view, WebApplicationInfo* app_info);
+
// Invokes pauseAnimationAtTime on the AnimationController associated with the
// |view|s main frame.
// This is used by test shell.