| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WEBKIT_GLUE_H_ | 5 #ifndef WEBKIT_GLUE_WEBKIT_GLUE_H_ |
| 6 #define WEBKIT_GLUE_WEBKIT_GLUE_H_ | 6 #define WEBKIT_GLUE_WEBKIT_GLUE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 | 9 |
| 10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 WEBKIT_GLUE_EXPORT string16 DumpDocumentText(WebKit::WebFrame* web_frame); | 43 WEBKIT_GLUE_EXPORT string16 DumpDocumentText(WebKit::WebFrame* web_frame); |
| 44 | 44 |
| 45 // Returns the text of the document element and optionally its child frames. | 45 // Returns the text of the document element and optionally its child frames. |
| 46 // If recursive is false, this is equivalent to DumpDocumentText followed by | 46 // If recursive is false, this is equivalent to DumpDocumentText followed by |
| 47 // a newline. If recursive is true, it recursively dumps all frames as text. | 47 // a newline. If recursive is true, it recursively dumps all frames as text. |
| 48 string16 DumpFramesAsText(WebKit::WebFrame* web_frame, bool recursive); | 48 string16 DumpFramesAsText(WebKit::WebFrame* web_frame, bool recursive); |
| 49 | 49 |
| 50 // Returns the renderer's description of its tree (its externalRepresentation). | 50 // Returns the renderer's description of its tree (its externalRepresentation). |
| 51 WEBKIT_GLUE_EXPORT string16 DumpRenderer(WebKit::WebFrame* web_frame); | 51 WEBKIT_GLUE_EXPORT string16 DumpRenderer(WebKit::WebFrame* web_frame); |
| 52 | 52 |
| 53 // Returns the number of page where the specified element will be put. | |
| 54 int PageNumberForElementById(WebKit::WebFrame* web_frame, | |
| 55 const std::string& id, | |
| 56 float page_width_in_pixels, | |
| 57 float page_height_in_pixels); | |
| 58 | |
| 59 // Returns the number of pages to be printed. | |
| 60 int NumberOfPages(WebKit::WebFrame* web_frame, | |
| 61 float page_width_in_pixels, | |
| 62 float page_height_in_pixels); | |
| 63 | |
| 64 // Returns a dump of the scroll position of the webframe. | 53 // Returns a dump of the scroll position of the webframe. |
| 65 string16 DumpFrameScrollPosition(WebKit::WebFrame* web_frame, bool recursive); | 54 string16 DumpFrameScrollPosition(WebKit::WebFrame* web_frame, bool recursive); |
| 66 | 55 |
| 67 // Returns a dump of the given history state suitable for implementing the | 56 // Returns a dump of the given history state suitable for implementing the |
| 68 // dumpBackForwardList command of the testRunner. | 57 // dumpBackForwardList command of the testRunner. |
| 69 WEBKIT_GLUE_EXPORT string16 DumpHistoryState(const std::string& history_state, | 58 WEBKIT_GLUE_EXPORT string16 DumpHistoryState(const std::string& history_state, |
| 70 int indent, | 59 int indent, |
| 71 bool is_current); | 60 bool is_current); |
| 72 | 61 |
| 73 #ifndef NDEBUG | 62 #ifndef NDEBUG |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 WEBKIT_GLUE_EXPORT bool IsInspectorProtocolVersionSupported( | 99 WEBKIT_GLUE_EXPORT bool IsInspectorProtocolVersionSupported( |
| 111 const std::string& version); | 100 const std::string& version); |
| 112 | 101 |
| 113 // Configures the URLRequest according to the referrer policy. | 102 // Configures the URLRequest according to the referrer policy. |
| 114 WEBKIT_GLUE_EXPORT void ConfigureURLRequestForReferrerPolicy( | 103 WEBKIT_GLUE_EXPORT void ConfigureURLRequestForReferrerPolicy( |
| 115 net::URLRequest* request, WebKit::WebReferrerPolicy referrer_policy); | 104 net::URLRequest* request, WebKit::WebReferrerPolicy referrer_policy); |
| 116 | 105 |
| 117 } // namespace webkit_glue | 106 } // namespace webkit_glue |
| 118 | 107 |
| 119 #endif // WEBKIT_GLUE_WEBKIT_GLUE_H_ | 108 #endif // WEBKIT_GLUE_WEBKIT_GLUE_H_ |
| OLD | NEW |