| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 : public content::RenderViewObserver, | 66 : public content::RenderViewObserver, |
| 67 public content::RenderViewObserverTracker<PrintWebViewHelper> { | 67 public content::RenderViewObserverTracker<PrintWebViewHelper> { |
| 68 public: | 68 public: |
| 69 explicit PrintWebViewHelper(content::RenderView* render_view); | 69 explicit PrintWebViewHelper(content::RenderView* render_view); |
| 70 virtual ~PrintWebViewHelper(); | 70 virtual ~PrintWebViewHelper(); |
| 71 | 71 |
| 72 bool IsPrintingEnabled(); | 72 bool IsPrintingEnabled(); |
| 73 | 73 |
| 74 void PrintNode(const blink::WebNode& node); | 74 void PrintNode(const blink::WebNode& node); |
| 75 | 75 |
| 76 // Set print preset options from source PDF document. |
| 77 void SetPrintPresetOptionsFromDocument( |
| 78 PrintHostMsg_SetOptionsFromDocument_Params& params); |
| 79 |
| 76 private: | 80 private: |
| 77 friend class PrintWebViewHelperTestBase; | 81 friend class PrintWebViewHelperTestBase; |
| 78 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperPreviewTest, | 82 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperPreviewTest, |
| 79 BlockScriptInitiatedPrinting); | 83 BlockScriptInitiatedPrinting); |
| 80 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperTest, OnPrintPages); | 84 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperTest, OnPrintPages); |
| 81 | 85 |
| 82 #if defined(OS_WIN) || defined(OS_MACOSX) | 86 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 83 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperTest, PrintLayoutTest); | 87 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperTest, PrintLayoutTest); |
| 84 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperTest, PrintWithIframe); | 88 FRIEND_TEST_ALL_PREFIXES(PrintWebViewHelperTest, PrintWithIframe); |
| 85 #endif // defined(OS_WIN) || defined(OS_MACOSX) | 89 #endif // defined(OS_WIN) || defined(OS_MACOSX) |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 // hangs because RequestPrintPreview is called before DidStopLoading() is | 442 // hangs because RequestPrintPreview is called before DidStopLoading() is |
| 439 // called. This is a store for the RequestPrintPreview() call and its | 443 // called. This is a store for the RequestPrintPreview() call and its |
| 440 // parameters so that it can be invoked after DidStopLoading. | 444 // parameters so that it can be invoked after DidStopLoading. |
| 441 base::Closure on_stop_loading_closure_; | 445 base::Closure on_stop_loading_closure_; |
| 442 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); | 446 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); |
| 443 }; | 447 }; |
| 444 | 448 |
| 445 } // namespace printing | 449 } // namespace printing |
| 446 | 450 |
| 447 #endif // CHROME_RENDERER_PRINTING_PRINT_WEB_VIEW_HELPER_H_ | 451 #endif // CHROME_RENDERER_PRINTING_PRINT_WEB_VIEW_HELPER_H_ |
| OLD | NEW |