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 // Make this function a part of the public interface, since it is called | |
94 // directly from PPAPI for plugin printing. | |
jam
2012/01/12 22:43:01
this comment is redundant since it's describing so
| |
95 void PrintNode(const WebKit::WebNode& node); | |
96 | |
93 protected: | 97 protected: |
94 // WebKit::WebViewClient override: | 98 // WebKit::WebViewClient override: |
95 virtual void didStopLoading(); | 99 virtual void didStopLoading(); |
96 | 100 |
97 private: | 101 private: |
98 friend class PrintWebViewHelperTestBase; | 102 friend class PrintWebViewHelperTestBase; |
99 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperTest, | 103 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperTest, |
100 BlockScriptInitiatedPrinting); | 104 BlockScriptInitiatedPrinting); |
101 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperTest, OnPrintPages); | 105 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperTest, OnPrintPages); |
102 | 106 |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
455 | 459 |
456 State state_; | 460 State state_; |
457 }; | 461 }; |
458 | 462 |
459 PrintPreviewContext print_preview_context_; | 463 PrintPreviewContext print_preview_context_; |
460 | 464 |
461 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); | 465 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); |
462 }; | 466 }; |
463 | 467 |
464 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 468 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
OLD | NEW |