Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: webkit/glue/dom_operations.h

Issue 4979003: Implement web app definition parsing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nacl64 build Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 WEBKIT_GLUE_DOM_OPERATIONS_H__ 5 #ifndef WEBKIT_GLUE_DOM_OPERATIONS_H__
6 #define WEBKIT_GLUE_DOM_OPERATIONS_H__ 6 #define WEBKIT_GLUE_DOM_OPERATIONS_H__
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "gfx/size.h"
12 #include "googleurl/src/gurl.h" 11 #include "googleurl/src/gurl.h"
13 12
14 namespace WebKit { 13 namespace WebKit {
15 class WebDocument; 14 class WebDocument;
16 class WebElement; 15 class WebElement;
17 class WebString; 16 class WebString;
18 class WebView; 17 class WebView;
19 } 18 }
20 19
21 // A collection of operations that access the underlying WebKit DOM directly. 20 // A collection of operations that access the underlying WebKit DOM directly.
(...skipping 25 matching lines...) Expand all
47 }; 46 };
48 47
49 // Get all savable resource links from current webview, include main frame 48 // Get all savable resource links from current webview, include main frame
50 // and sub-frame. After collecting all savable resource links, this function 49 // and sub-frame. After collecting all savable resource links, this function
51 // will send those links to embedder. Return value indicates whether we get 50 // will send those links to embedder. Return value indicates whether we get
52 // all saved resource links successfully. 51 // all saved resource links successfully.
53 bool GetAllSavableResourceLinksForCurrentPage(WebKit::WebView* view, 52 bool GetAllSavableResourceLinksForCurrentPage(WebKit::WebView* view,
54 const GURL& page_url, SavableResourcesResult* savable_resources_result, 53 const GURL& page_url, SavableResourcesResult* savable_resources_result,
55 const char** savable_schemes); 54 const char** savable_schemes);
56 55
57 // Structure used when installing a web page as an app. Populated via
58 // GetApplicationInfo.
59 struct WebApplicationInfo {
60 WebApplicationInfo();
61 ~WebApplicationInfo();
62
63 struct IconInfo {
64 GURL url;
65 int width;
66 int height;
67 };
68
69 // Title of the application. This is set from the meta tag whose name is
70 // 'application-name'.
71 string16 title;
72
73 // Description of the application. This is set from the meta tag whose name
74 // is 'description'.
75 string16 description;
76
77 // URL for the app. This is set from the meta tag whose name is
78 // 'application-url'.
79 GURL app_url;
80
81 // Set of available icons. This is set for all link tags whose rel=icon. Only
82 // icons that have a non-zero (width and/or height) are added.
83 std::vector<IconInfo> icons;
84 };
85
86 // Parses the icon's size attribute as defined in the HTML 5 spec. Returns true
87 // on success, false on errors. On success either all the sizes specified in
88 // the attribute are added to sizes, or is_any is set to true.
89 //
90 // You shouldn't have a need to invoke this directly, it's public for testing.
91 bool ParseIconSizes(const string16& text,
92 std::vector<gfx::Size>* sizes,
93 bool* is_any);
94
95 // Gets the application info for the specified page. See the description of
96 // WebApplicationInfo for details as to where each field comes from.
97 void GetApplicationInfo(WebKit::WebView* view, WebApplicationInfo* app_info);
98
99 // Invokes pauseAnimationAtTime on the AnimationController associated with the 56 // Invokes pauseAnimationAtTime on the AnimationController associated with the
100 // |view|s main frame. 57 // |view|s main frame.
101 // This is used by test shell. 58 // This is used by test shell.
102 bool PauseAnimationAtTimeOnElementWithId(WebKit::WebView* view, 59 bool PauseAnimationAtTimeOnElementWithId(WebKit::WebView* view,
103 const std::string& animation_name, 60 const std::string& animation_name,
104 double time, 61 double time,
105 const std::string& element_id); 62 const std::string& element_id);
106 63
107 // Invokes pauseTransitionAtTime on the AnimationController associated with the 64 // Invokes pauseTransitionAtTime on the AnimationController associated with the
108 // |view|s main frame. 65 // |view|s main frame.
(...skipping 23 matching lines...) Expand all
132 // with a value of |attribute_value| in |meta_elements|. 89 // with a value of |attribute_value| in |meta_elements|.
133 void GetMetaElementsWithAttribute( 90 void GetMetaElementsWithAttribute(
134 WebKit::WebDocument* document, 91 WebKit::WebDocument* document,
135 const string16& attribute_name, 92 const string16& attribute_name,
136 const string16& atribute_value, 93 const string16& atribute_value,
137 std::vector<WebKit::WebElement>* meta_elements); 94 std::vector<WebKit::WebElement>* meta_elements);
138 95
139 } // namespace webkit_glue 96 } // namespace webkit_glue
140 97
141 #endif // WEBKIT_GLUE_DOM_OPERATIONS_H__ 98 #endif // WEBKIT_GLUE_DOM_OPERATIONS_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698