summaryrefslogtreecommitdiffstats
path: root/webkit/glue/dom_operations.h
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-17 05:34:36 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-17 05:34:36 +0000
commitd978840b3799a139f284c413ffe79b03944afa5e (patch)
tree852096116256af73dcb5fb79c5c8406d3694d6ac /webkit/glue/dom_operations.h
parent61bb694d38cc0d944c5cdd07ed44f6c72868e05e (diff)
downloadchromium_src-d978840b3799a139f284c413ffe79b03944afa5e.zip
chromium_src-d978840b3799a139f284c413ffe79b03944afa5e.tar.gz
chromium_src-d978840b3799a139f284c413ffe79b03944afa5e.tar.bz2
Revert "Implement web app definition parsing."
This reverts commit 24e3962db61243eea4976bead441c6206cd4f21e. TBR=aa@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66394 0039d316-1c4b-4281-b951-d872f2087c98
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.