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 #ifndef CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 5 #ifndef CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
6 #define CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 6 #define CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 // of the document and creating a new WebView with the contents. | 83 // of the document and creating a new WebView with the contents. |
84 class PrintWebViewHelper | 84 class PrintWebViewHelper |
85 : public content::RenderViewObserver, | 85 : public content::RenderViewObserver, |
86 public content::RenderViewObserverTracker<PrintWebViewHelper>, | 86 public content::RenderViewObserverTracker<PrintWebViewHelper>, |
87 public WebKit::WebViewClient, | 87 public WebKit::WebViewClient, |
88 public WebKit::WebFrameClient { | 88 public WebKit::WebFrameClient { |
89 public: | 89 public: |
90 explicit PrintWebViewHelper(content::RenderView* render_view); | 90 explicit PrintWebViewHelper(content::RenderView* render_view); |
91 virtual ~PrintWebViewHelper(); | 91 virtual ~PrintWebViewHelper(); |
92 | 92 |
| 93 void PrintNode(const WebKit::WebNode& node); |
| 94 |
93 protected: | 95 protected: |
94 // WebKit::WebViewClient override: | 96 // WebKit::WebViewClient override: |
95 virtual void didStopLoading(); | 97 virtual void didStopLoading(); |
96 | 98 |
97 private: | 99 private: |
98 friend class PrintWebViewHelperTestBase; | 100 friend class PrintWebViewHelperTestBase; |
99 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperTest, | 101 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperTest, |
100 BlockScriptInitiatedPrinting); | 102 BlockScriptInitiatedPrinting); |
101 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperTest, OnPrintPages); | 103 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperTest, OnPrintPages); |
102 | 104 |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 | 457 |
456 State state_; | 458 State state_; |
457 }; | 459 }; |
458 | 460 |
459 PrintPreviewContext print_preview_context_; | 461 PrintPreviewContext print_preview_context_; |
460 | 462 |
461 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); | 463 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); |
462 }; | 464 }; |
463 | 465 |
464 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 466 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
OLD | NEW |