| 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_BROWSER_PRINTING_PRINT_VIEW_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_H_ |
| 6 #define CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_H_ | 6 #define CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // a particular WebNode. | 60 // a particular WebNode. |
| 61 void PrintPreviewForWebNode(); | 61 void PrintPreviewForWebNode(); |
| 62 | 62 |
| 63 // Notify PrintViewManager that print preview has finished. Unfreeze the | 63 // Notify PrintViewManager that print preview has finished. Unfreeze the |
| 64 // renderer in the case of scripted print preview. | 64 // renderer in the case of scripted print preview. |
| 65 void PrintPreviewDone(); | 65 void PrintPreviewDone(); |
| 66 | 66 |
| 67 // Handles cancelled preview printing request. | 67 // Handles cancelled preview printing request. |
| 68 void PreviewPrintingRequestCancelled(); | 68 void PreviewPrintingRequestCancelled(); |
| 69 | 69 |
| 70 // Whether to block scripted printing or not. |
| 71 void SetScriptedPrintingBlocked(bool blocked); |
| 72 |
| 70 // Sets |observer| as the current PrintViewManagerObserver. Pass in NULL to | 73 // Sets |observer| as the current PrintViewManagerObserver. Pass in NULL to |
| 71 // remove the current observer. |observer| may always be NULL, but |observer_| | 74 // remove the current observer. |observer| may always be NULL, but |observer_| |
| 72 // must be NULL if |observer| is non-NULL. | 75 // must be NULL if |observer| is non-NULL. |
| 73 void set_observer(PrintViewManagerObserver* observer); | 76 void set_observer(PrintViewManagerObserver* observer); |
| 74 | 77 |
| 75 // PrintedPagesSource implementation. | 78 // PrintedPagesSource implementation. |
| 76 virtual string16 RenderSourceName() OVERRIDE; | 79 virtual string16 RenderSourceName() OVERRIDE; |
| 77 | 80 |
| 78 // content::NotificationObserver implementation. | 81 // content::NotificationObserver implementation. |
| 79 virtual void Observe(int type, | 82 virtual void Observe(int type, |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 | 200 |
| 198 // Keeps track of the pending callback during scripted print preview. | 201 // Keeps track of the pending callback during scripted print preview. |
| 199 content::RenderProcessHost* scripted_print_preview_rph_; | 202 content::RenderProcessHost* scripted_print_preview_rph_; |
| 200 | 203 |
| 201 DISALLOW_COPY_AND_ASSIGN(PrintViewManager); | 204 DISALLOW_COPY_AND_ASSIGN(PrintViewManager); |
| 202 }; | 205 }; |
| 203 | 206 |
| 204 } // namespace printing | 207 } // namespace printing |
| 205 | 208 |
| 206 #endif // CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_H_ | 209 #endif // CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_H_ |
| OLD | NEW |