| 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 #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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 result.append(DumpFramesAsText(child, recursive)); | 132 result.append(DumpFramesAsText(child, recursive)); |
| 133 } | 133 } |
| 134 | 134 |
| 135 return result; | 135 return result; |
| 136 } | 136 } |
| 137 | 137 |
| 138 string16 DumpRenderer(WebFrame* web_frame) { | 138 string16 DumpRenderer(WebFrame* web_frame) { |
| 139 return web_frame->renderTreeAsText(); | 139 return web_frame->renderTreeAsText(); |
| 140 } | 140 } |
| 141 | 141 |
| 142 int PageNumberForElementById(WebFrame* web_frame, | |
| 143 const std::string& id, | |
| 144 float page_width_in_pixels, | |
| 145 float page_height_in_pixels) { | |
| 146 return web_frame->pageNumberForElementById(WebString::fromUTF8(id), | |
| 147 page_width_in_pixels, | |
| 148 page_height_in_pixels); | |
| 149 } | |
| 150 | |
| 151 int NumberOfPages(WebFrame* web_frame, | 142 int NumberOfPages(WebFrame* web_frame, |
| 152 float page_width_in_pixels, | 143 float page_width_in_pixels, |
| 153 float page_height_in_pixels) { | 144 float page_height_in_pixels) { |
| 154 WebSize size(static_cast<int>(page_width_in_pixels), | 145 WebSize size(static_cast<int>(page_width_in_pixels), |
| 155 static_cast<int>(page_height_in_pixels)); | 146 static_cast<int>(page_height_in_pixels)); |
| 156 | 147 |
| 157 WebPrintParams print_params; | 148 WebPrintParams print_params; |
| 158 print_params.paperSize = size; | 149 print_params.paperSize = size; |
| 159 print_params.printContentArea = WebRect(0, 0, size.width, size.height); | 150 print_params.printContentArea = WebRect(0, 0, size.width, size.height); |
| 160 print_params.printableArea = WebRect(0, 0, size.width, size.height); | 151 print_params.printableArea = WebRect(0, 0, size.width, size.height); |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 case WebKit::WebReferrerPolicyOrigin: | 490 case WebKit::WebReferrerPolicyOrigin: |
| 500 net_referrer_policy = net::URLRequest::NEVER_CLEAR_REFERRER; | 491 net_referrer_policy = net::URLRequest::NEVER_CLEAR_REFERRER; |
| 501 break; | 492 break; |
| 502 } | 493 } |
| 503 request->set_referrer_policy(net_referrer_policy); | 494 request->set_referrer_policy(net_referrer_policy); |
| 504 } | 495 } |
| 505 | 496 |
| 506 COMPILE_ASSERT(std::numeric_limits<double>::has_quiet_NaN, has_quiet_NaN); | 497 COMPILE_ASSERT(std::numeric_limits<double>::has_quiet_NaN, has_quiet_NaN); |
| 507 | 498 |
| 508 } // namespace webkit_glue | 499 } // namespace webkit_glue |
| OLD | NEW |