| 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_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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // a newline. If recursive is true, it recursively dumps all frames as text. | 57 // a newline. If recursive is true, it recursively dumps all frames as text. |
| 58 string16 DumpFramesAsText(WebKit::WebFrame* web_frame, bool recursive); | 58 string16 DumpFramesAsText(WebKit::WebFrame* web_frame, bool recursive); |
| 59 | 59 |
| 60 // Returns the renderer's description of its tree (its externalRepresentation). | 60 // Returns the renderer's description of its tree (its externalRepresentation). |
| 61 string16 DumpRenderer(WebKit::WebFrame* web_frame); | 61 string16 DumpRenderer(WebKit::WebFrame* web_frame); |
| 62 | 62 |
| 63 // Fill the value of counter in the element specified by the id into | 63 // Fill the value of counter in the element specified by the id into |
| 64 // counter_value. Return false when the specified id doesn't exist. | 64 // counter_value. Return false when the specified id doesn't exist. |
| 65 bool CounterValueForElementById(WebKit::WebFrame* web_frame, | 65 bool CounterValueForElementById(WebKit::WebFrame* web_frame, |
| 66 const std::string& id, | 66 const std::string& id, |
| 67 std::wstring* counter_value); | 67 string16* counter_value); |
| 68 | 68 |
| 69 // Returns the number of page where the specified element will be put. | 69 // Returns the number of page where the specified element will be put. |
| 70 int PageNumberForElementById(WebKit::WebFrame* web_frame, | 70 int PageNumberForElementById(WebKit::WebFrame* web_frame, |
| 71 const std::string& id, | 71 const std::string& id, |
| 72 float page_width_in_pixels, | 72 float page_width_in_pixels, |
| 73 float page_height_in_pixels); | 73 float page_height_in_pixels); |
| 74 | 74 |
| 75 // Returns the number of pages to be printed. | 75 // Returns the number of pages to be printed. |
| 76 int NumberOfPages(WebKit::WebFrame* web_frame, | 76 int NumberOfPages(WebKit::WebFrame* web_frame, |
| 77 float page_width_in_pixels, | 77 float page_width_in_pixels, |
| 78 float page_height_in_pixels); | 78 float page_height_in_pixels); |
| 79 | 79 |
| 80 // Returns a dump of the scroll position of the webframe. | 80 // Returns a dump of the scroll position of the webframe. |
| 81 std::wstring DumpFrameScrollPosition(WebKit::WebFrame* web_frame, | 81 string16 DumpFrameScrollPosition(WebKit::WebFrame* web_frame, bool recursive); |
| 82 bool recursive); | |
| 83 | 82 |
| 84 // Returns a dump of the given history state suitable for implementing the | 83 // Returns a dump of the given history state suitable for implementing the |
| 85 // dumpBackForwardList command of the layoutTestController. | 84 // dumpBackForwardList command of the layoutTestController. |
| 86 std::wstring DumpHistoryState(const std::string& history_state, int indent, | 85 string16 DumpHistoryState(const std::string& history_state, int indent, |
| 87 bool is_current); | 86 bool is_current); |
| 88 | 87 |
| 89 // Cleans up state left over from the previous test run. | 88 // Cleans up state left over from the previous test run. |
| 90 void ResetBeforeTestRun(WebKit::WebView* view); | 89 void ResetBeforeTestRun(WebKit::WebView* view); |
| 91 | 90 |
| 92 // Returns the WebKit version (major.minor). | 91 // Returns the WebKit version (major.minor). |
| 93 std::string GetWebKitVersion(); | 92 std::string GetWebKitVersion(); |
| 94 | 93 |
| 95 // Called to override the default user agent with a custom one. Call this | 94 // Called to override the default user agent with a custom one. Call this |
| 96 // before anyone actually asks for the user agent in order to prevent | 95 // before anyone actually asks for the user agent in order to prevent |
| 97 // inconsistent behavior. | 96 // inconsistent behavior. |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 bool GetFontTable(int fd, uint32_t table, uint8_t* output, | 290 bool GetFontTable(int fd, uint32_t table, uint8_t* output, |
| 292 size_t* output_length); | 291 size_t* output_length); |
| 293 #endif | 292 #endif |
| 294 | 293 |
| 295 // ---- END FUNCTIONS IMPLEMENTED BY EMBEDDER --------------------------------- | 294 // ---- END FUNCTIONS IMPLEMENTED BY EMBEDDER --------------------------------- |
| 296 | 295 |
| 297 | 296 |
| 298 } // namespace webkit_glue | 297 } // namespace webkit_glue |
| 299 | 298 |
| 300 #endif // WEBKIT_GLUE_WEBKIT_GLUE_H_ | 299 #endif // WEBKIT_GLUE_WEBKIT_GLUE_H_ |
| OLD | NEW |