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 #ifndef CHROME_RENDERER_PRINTING_PRINT_WEB_VIEW_HELPER_H_ | 5 #ifndef CHROME_RENDERER_PRINTING_PRINT_WEB_VIEW_HELPER_H_ |
6 #define CHROME_RENDERER_PRINTING_PRINT_WEB_VIEW_HELPER_H_ | 6 #define CHROME_RENDERER_PRINTING_PRINT_WEB_VIEW_HELPER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 75 |
76 bool IsPrintingEnabled(); | 76 bool IsPrintingEnabled(); |
77 | 77 |
78 void PrintNode(const blink::WebNode& node); | 78 void PrintNode(const blink::WebNode& node); |
79 | 79 |
80 private: | 80 private: |
81 friend class PrintWebViewHelperTestBase; | 81 friend class PrintWebViewHelperTestBase; |
82 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperPreviewTest, | 82 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperPreviewTest, |
83 BlockScriptInitiatedPrinting); | 83 BlockScriptInitiatedPrinting); |
84 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperTest, OnPrintPages); | 84 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperTest, OnPrintPages); |
85 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperTest, OnPrintPages); | |
86 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperTest, | 85 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperTest, |
87 BlockScriptInitiatedPrinting); | 86 BlockScriptInitiatedPrinting); |
88 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperTest, | 87 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperTest, |
89 BlockScriptInitiatedPrintingFromPopup); | 88 BlockScriptInitiatedPrintingFromPopup); |
90 #if defined(OS_WIN) || defined(OS_MACOSX) | 89 #if defined(OS_WIN) || defined(OS_MACOSX) |
91 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperTest, PrintLayoutTest); | 90 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperTest, PrintLayoutTest); |
92 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperTest, PrintWithIframe); | 91 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperTest, PrintWithIframe); |
93 #endif // defined(OS_WIN) || defined(OS_MACOSX) | 92 #endif // defined(OS_WIN) || defined(OS_MACOSX) |
94 | 93 |
95 enum PrintingResult { | 94 enum PrintingResult { |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 // hangs because RequestPrintPreview is called before DidStopLoading() is | 465 // hangs because RequestPrintPreview is called before DidStopLoading() is |
467 // called. This is a store for the RequestPrintPreview() call and its | 466 // called. This is a store for the RequestPrintPreview() call and its |
468 // parameters so that it can be invoked after DidStopLoading. | 467 // parameters so that it can be invoked after DidStopLoading. |
469 base::Closure on_stop_loading_closure_; | 468 base::Closure on_stop_loading_closure_; |
470 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); | 469 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); |
471 }; | 470 }; |
472 | 471 |
473 } // namespace printing | 472 } // namespace printing |
474 | 473 |
475 #endif // CHROME_RENDERER_PRINTING_PRINT_WEB_VIEW_HELPER_H_ | 474 #endif // CHROME_RENDERER_PRINTING_PRINT_WEB_VIEW_HELPER_H_ |
OLD | NEW |