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_MOCKS_MOCK_WEBFRAME_H_ | 5 #ifndef WEBKIT_MOCKS_MOCK_WEBFRAME_H_ |
6 #define WEBKIT_MOCKS_MOCK_WEBFRAME_H_ | 6 #define WEBKIT_MOCKS_MOCK_WEBFRAME_H_ |
7 | 7 |
8 #include "testing/gmock/include/gmock/gmock.h" | 8 #include "testing/gmock/include/gmock/gmock.h" |
9 #include "third_party/WebKit/WebKit/chromium/public/WebDocument.h" | 9 #include "third_party/WebKit/WebKit/chromium/public/WebDocument.h" |
10 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" | 10 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 using WebKit::WebCanvas; | 22 using WebKit::WebCanvas; |
23 using WebKit::WebConsoleMessage; | 23 using WebKit::WebConsoleMessage; |
24 using WebKit::WebData; | 24 using WebKit::WebData; |
25 using WebKit::WebDocument; | 25 using WebKit::WebDocument; |
26 using WebKit::WebElement; | 26 using WebKit::WebElement; |
27 using WebKit::WebFindOptions; | 27 using WebKit::WebFindOptions; |
28 using WebKit::WebFormElement; | 28 using WebKit::WebFormElement; |
29 using WebKit::WebFrame; | 29 using WebKit::WebFrame; |
30 using WebKit::WebHistoryItem; | 30 using WebKit::WebHistoryItem; |
31 using WebKit::WebInputElement; | 31 using WebKit::WebInputElement; |
| 32 using WebKit::WebNode; |
32 using WebKit::WebPasswordAutocompleteListener; | 33 using WebKit::WebPasswordAutocompleteListener; |
33 using WebKit::WebPerformance; | 34 using WebKit::WebPerformance; |
34 using WebKit::WebRange; | 35 using WebKit::WebRange; |
35 using WebKit::WebRect; | 36 using WebKit::WebRect; |
36 using WebKit::WebURLRequest; | 37 using WebKit::WebURLRequest; |
37 using WebKit::WebSecurityOrigin; | 38 using WebKit::WebSecurityOrigin; |
38 using WebKit::WebScriptSource; | 39 using WebKit::WebScriptSource; |
39 using WebKit::WebSize; | 40 using WebKit::WebSize; |
40 using WebKit::WebString; | 41 using WebKit::WebString; |
41 using WebKit::WebURL; | 42 using WebKit::WebURL; |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 } | 260 } |
260 virtual WebString selectionAsText() const { | 261 virtual WebString selectionAsText() const { |
261 return WebString(); | 262 return WebString(); |
262 } | 263 } |
263 virtual WebString selectionAsMarkup() const { | 264 virtual WebString selectionAsMarkup() const { |
264 return WebString(); | 265 return WebString(); |
265 } | 266 } |
266 virtual bool selectWordAroundCaret() { | 267 virtual bool selectWordAroundCaret() { |
267 return false; | 268 return false; |
268 } | 269 } |
269 virtual int printBegin(const WebSize& pageSize, int printerDPI = 72, | 270 #if defined(WEBFRAME_PRINTBEGIN_TAKES_NODE) |
| 271 virtual int printBegin(const WebSize& pageSize, |
| 272 const WebNode& constrainToNode, |
| 273 int printerDPI = 72, |
270 bool* useBrowserOverlays = 0) { | 274 bool* useBrowserOverlays = 0) { |
| 275 #else |
| 276 virtual int printBegin(const WebSize& pageSize, int printerDPI = 72, |
| 277 bool* useBrowserOverlays = 0) { |
| 278 #endif |
271 return 0; | 279 return 0; |
272 } | 280 } |
273 virtual float getPrintPageShrink(int page) { | 281 virtual float getPrintPageShrink(int page) { |
274 return 0; | 282 return 0; |
275 } | 283 } |
276 virtual float printPage(int pageToPrint, WebCanvas*) { | 284 virtual float printPage(int pageToPrint, WebCanvas*) { |
277 return 0; | 285 return 0; |
278 } | 286 } |
279 virtual void printEnd() {} | 287 virtual void printEnd() {} |
280 virtual bool isPageBoxVisible(int pageIndex) { | 288 virtual bool isPageBoxVisible(int pageIndex) { |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 return WebString(); | 351 return WebString(); |
344 } | 352 } |
345 | 353 |
346 private: | 354 private: |
347 DISALLOW_COPY_AND_ASSIGN(MockWebFrame); | 355 DISALLOW_COPY_AND_ASSIGN(MockWebFrame); |
348 }; | 356 }; |
349 | 357 |
350 } // namespace webkit_glue | 358 } // namespace webkit_glue |
351 | 359 |
352 #endif // WEBKIT_MOCKS_MOCK_WEBFRAME_H_ | 360 #endif // WEBKIT_MOCKS_MOCK_WEBFRAME_H_ |
OLD | NEW |