OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "webkit/glue/webkit_glue.h" | 5 #include "webkit/glue/webkit_glue.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <objidl.h> | 8 #include <objidl.h> |
9 #include <mlang.h> | 9 #include <mlang.h> |
10 #elif defined(OS_POSIX) && !defined(OS_MACOSX) | 10 #elif defined(OS_POSIX) && !defined(OS_MACOSX) |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 return web_frame->pageNumberForElementById(WebString::fromUTF8(id), | 147 return web_frame->pageNumberForElementById(WebString::fromUTF8(id), |
148 page_width_in_pixels, | 148 page_width_in_pixels, |
149 page_height_in_pixels); | 149 page_height_in_pixels); |
150 } | 150 } |
151 | 151 |
152 int NumberOfPages(WebFrame* web_frame, | 152 int NumberOfPages(WebFrame* web_frame, |
153 float page_width_in_pixels, | 153 float page_width_in_pixels, |
154 float page_height_in_pixels) { | 154 float page_height_in_pixels) { |
155 WebSize size(static_cast<int>(page_width_in_pixels), | 155 WebSize size(static_cast<int>(page_width_in_pixels), |
156 static_cast<int>(page_height_in_pixels)); | 156 static_cast<int>(page_height_in_pixels)); |
157 int number_of_pages = web_frame->printBegin(size); | 157 web_frame->printBegin(); |
| 158 int number_of_pages = web_frame->setPageSizeResolution(size); |
158 web_frame->printEnd(); | 159 web_frame->printEnd(); |
159 return number_of_pages; | 160 return number_of_pages; |
160 } | 161 } |
161 | 162 |
162 string16 DumpFrameScrollPosition(WebFrame* web_frame, bool recursive) { | 163 string16 DumpFrameScrollPosition(WebFrame* web_frame, bool recursive) { |
163 gfx::Size offset = web_frame->scrollOffset(); | 164 gfx::Size offset = web_frame->scrollOffset(); |
164 std::string result_utf8; | 165 std::string result_utf8; |
165 | 166 |
166 if (offset.width() > 0 || offset.height() > 0) { | 167 if (offset.width() > 0 || offset.height() > 0) { |
167 if (web_frame->parent()) { | 168 if (web_frame->parent()) { |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 NOTIMPLEMENTED(); | 445 NOTIMPLEMENTED(); |
445 return NULL; | 446 return NULL; |
446 #endif | 447 #endif |
447 } | 448 } |
448 | 449 |
449 int GetGlyphPageCount() { | 450 int GetGlyphPageCount() { |
450 return WebGlyphCache::pageCount(); | 451 return WebGlyphCache::pageCount(); |
451 } | 452 } |
452 | 453 |
453 } // namespace webkit_glue | 454 } // namespace webkit_glue |
OLD | NEW |