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 #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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 web_frame->printEnd(); | 150 web_frame->printEnd(); |
151 return number_of_pages; | 151 return number_of_pages; |
152 } | 152 } |
153 | 153 |
154 std::wstring DumpFrameScrollPosition(WebFrame* web_frame, bool recursive) { | 154 std::wstring DumpFrameScrollPosition(WebFrame* web_frame, bool recursive) { |
155 gfx::Size offset = web_frame->scrollOffset(); | 155 gfx::Size offset = web_frame->scrollOffset(); |
156 std::wstring result; | 156 std::wstring result; |
157 | 157 |
158 if (offset.width() > 0 || offset.height() > 0) { | 158 if (offset.width() > 0 || offset.height() > 0) { |
159 if (web_frame->parent()) { | 159 if (web_frame->parent()) { |
160 StringAppendF(&result, L"frame '%ls' ", UTF16ToWide( | 160 base::StringAppendF(&result, L"frame '%ls' ", UTF16ToWide( |
161 web_frame->name()).c_str()); | 161 web_frame->name()).c_str()); |
162 } | 162 } |
163 StringAppendF(&result, L"scrolled to %d,%d\n", | 163 base::StringAppendF(&result, L"scrolled to %d,%d\n", |
164 offset.width(), offset.height()); | 164 offset.width(), offset.height()); |
165 } | 165 } |
166 | 166 |
167 if (recursive) { | 167 if (recursive) { |
168 WebFrame* child = web_frame->firstChild(); | 168 WebFrame* child = web_frame->firstChild(); |
169 for (; child; child = child->nextSibling()) | 169 for (; child; child = child->nextSibling()) |
170 result.append(DumpFrameScrollPosition(child, recursive)); | 170 result.append(DumpFrameScrollPosition(child, recursive)); |
171 } | 171 } |
172 | 172 |
173 return result; | 173 return result; |
174 } | 174 } |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 NOTIMPLEMENTED(); | 416 NOTIMPLEMENTED(); |
417 return NULL; | 417 return NULL; |
418 #endif | 418 #endif |
419 } | 419 } |
420 | 420 |
421 int GetGlyphPageCount() { | 421 int GetGlyphPageCount() { |
422 return WebGlyphCache::pageCount(); | 422 return WebGlyphCache::pageCount(); |
423 } | 423 } |
424 | 424 |
425 } // namespace webkit_glue | 425 } // namespace webkit_glue |
OLD | NEW |