| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 result.append(DumpFramesAsText(child, recursive)); | 130 result.append(DumpFramesAsText(child, recursive)); |
| 131 } | 131 } |
| 132 | 132 |
| 133 return result; | 133 return result; |
| 134 } | 134 } |
| 135 | 135 |
| 136 string16 DumpRenderer(WebFrame* web_frame) { | 136 string16 DumpRenderer(WebFrame* web_frame) { |
| 137 return web_frame->renderTreeAsText(); | 137 return web_frame->renderTreeAsText(); |
| 138 } | 138 } |
| 139 | 139 |
| 140 bool CounterValueForElementById(WebFrame* web_frame, const std::string& id, | |
| 141 string16* counter_value) { | |
| 142 WebString result = | |
| 143 web_frame->counterValueForElementById(WebString::fromUTF8(id)); | |
| 144 if (result.isNull()) | |
| 145 return false; | |
| 146 | |
| 147 *counter_value = result; | |
| 148 return true; | |
| 149 } | |
| 150 | |
| 151 int PageNumberForElementById(WebFrame* web_frame, | 140 int PageNumberForElementById(WebFrame* web_frame, |
| 152 const std::string& id, | 141 const std::string& id, |
| 153 float page_width_in_pixels, | 142 float page_width_in_pixels, |
| 154 float page_height_in_pixels) { | 143 float page_height_in_pixels) { |
| 155 return web_frame->pageNumberForElementById(WebString::fromUTF8(id), | 144 return web_frame->pageNumberForElementById(WebString::fromUTF8(id), |
| 156 page_width_in_pixels, | 145 page_width_in_pixels, |
| 157 page_height_in_pixels); | 146 page_height_in_pixels); |
| 158 } | 147 } |
| 159 | 148 |
| 160 int NumberOfPages(WebFrame* web_frame, | 149 int NumberOfPages(WebFrame* web_frame, |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 case WebKit::WebReferrerPolicyAlways: | 491 case WebKit::WebReferrerPolicyAlways: |
| 503 case WebKit::WebReferrerPolicyNever: | 492 case WebKit::WebReferrerPolicyNever: |
| 504 case WebKit::WebReferrerPolicyOrigin: | 493 case WebKit::WebReferrerPolicyOrigin: |
| 505 net_referrer_policy = net::URLRequest::NEVER_CLEAR_REFERRER; | 494 net_referrer_policy = net::URLRequest::NEVER_CLEAR_REFERRER; |
| 506 break; | 495 break; |
| 507 } | 496 } |
| 508 request->set_referrer_policy(net_referrer_policy); | 497 request->set_referrer_policy(net_referrer_policy); |
| 509 } | 498 } |
| 510 | 499 |
| 511 } // namespace webkit_glue | 500 } // namespace webkit_glue |
| OLD | NEW |