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 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 "googleurl/src/gurl.h" | 11 #include "googleurl/src/gurl.h" |
| 12 #include "webkit/glue/webkit_glue_export.h" |
12 | 13 |
13 namespace WebKit { | 14 namespace WebKit { |
14 class WebDocument; | 15 class WebDocument; |
15 class WebElement; | 16 class WebElement; |
16 class WebString; | 17 class WebString; |
17 class WebView; | 18 class WebView; |
18 } | 19 } |
19 | 20 |
20 // A collection of operations that access the underlying WebKit DOM directly. | 21 // A collection of operations that access the underlying WebKit DOM directly. |
21 namespace webkit_glue { | 22 namespace webkit_glue { |
(...skipping 20 matching lines...) Expand all Loading... |
42 frames_list(frames_list) { } | 43 frames_list(frames_list) { } |
43 | 44 |
44 private: | 45 private: |
45 DISALLOW_COPY_AND_ASSIGN(SavableResourcesResult); | 46 DISALLOW_COPY_AND_ASSIGN(SavableResourcesResult); |
46 }; | 47 }; |
47 | 48 |
48 // Get all savable resource links from current webview, include main frame | 49 // Get all savable resource links from current webview, include main frame |
49 // and sub-frame. After collecting all savable resource links, this function | 50 // and sub-frame. After collecting all savable resource links, this function |
50 // will send those links to embedder. Return value indicates whether we get | 51 // will send those links to embedder. Return value indicates whether we get |
51 // all saved resource links successfully. | 52 // all saved resource links successfully. |
52 bool GetAllSavableResourceLinksForCurrentPage(WebKit::WebView* view, | 53 WEBKIT_GLUE_EXPORT bool GetAllSavableResourceLinksForCurrentPage( |
| 54 WebKit::WebView* view, |
53 const GURL& page_url, SavableResourcesResult* savable_resources_result, | 55 const GURL& page_url, SavableResourcesResult* savable_resources_result, |
54 const char** savable_schemes); | 56 const char** savable_schemes); |
55 | 57 |
56 // Invokes pauseAnimationAtTime on the AnimationController associated with the | 58 // Invokes pauseAnimationAtTime on the AnimationController associated with the |
57 // |view|s main frame. | 59 // |view|s main frame. |
58 // This is used by test shell. | 60 // This is used by test shell. |
59 bool PauseAnimationAtTimeOnElementWithId(WebKit::WebView* view, | 61 bool PauseAnimationAtTimeOnElementWithId(WebKit::WebView* view, |
60 const std::string& animation_name, | 62 const std::string& animation_name, |
61 double time, | 63 double time, |
62 const std::string& element_id); | 64 const std::string& element_id); |
(...skipping 12 matching lines...) Expand all Loading... |
75 const std::string& element_id); | 77 const std::string& element_id); |
76 | 78 |
77 // Returns the number of animations currently running. | 79 // Returns the number of animations currently running. |
78 int NumberOfActiveAnimations(WebKit::WebView* view); | 80 int NumberOfActiveAnimations(WebKit::WebView* view); |
79 | 81 |
80 // Returns the value in an elements resource url attribute. For IMG, SCRIPT or | 82 // Returns the value in an elements resource url attribute. For IMG, SCRIPT or |
81 // INPUT TYPE=image, returns the value in "src". For LINK TYPE=text/css, returns | 83 // INPUT TYPE=image, returns the value in "src". For LINK TYPE=text/css, returns |
82 // the value in "href". For BODY, TABLE, TR, TD, returns the value in | 84 // the value in "href". For BODY, TABLE, TR, TD, returns the value in |
83 // "background". For BLOCKQUOTE, Q, DEL, INS, returns the value in "cite" | 85 // "background". For BLOCKQUOTE, Q, DEL, INS, returns the value in "cite" |
84 // attribute. Otherwise returns a null WebString. | 86 // attribute. Otherwise returns a null WebString. |
85 WebKit::WebString GetSubResourceLinkFromElement( | 87 WEBKIT_GLUE_EXPORT WebKit::WebString GetSubResourceLinkFromElement( |
86 const WebKit::WebElement& element); | 88 const WebKit::WebElement& element); |
87 | 89 |
88 // Puts the meta-elements of |document| that have the attribute |attribute_name| | 90 // Puts the meta-elements of |document| that have the attribute |attribute_name| |
89 // with a value of |attribute_value| in |meta_elements|. | 91 // with a value of |attribute_value| in |meta_elements|. |
90 void GetMetaElementsWithAttribute( | 92 WEBKIT_GLUE_EXPORT void GetMetaElementsWithAttribute( |
91 WebKit::WebDocument* document, | 93 WebKit::WebDocument* document, |
92 const string16& attribute_name, | 94 const string16& attribute_name, |
93 const string16& atribute_value, | 95 const string16& atribute_value, |
94 std::vector<WebKit::WebElement>* meta_elements); | 96 std::vector<WebKit::WebElement>* meta_elements); |
95 | 97 |
96 } // namespace webkit_glue | 98 } // namespace webkit_glue |
97 | 99 |
98 #endif // WEBKIT_GLUE_DOM_OPERATIONS_H__ | 100 #endif // WEBKIT_GLUE_DOM_OPERATIONS_H__ |
OLD | NEW |