| 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 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "chrome/browser/printing/print_view_manager_base.h" | 9 #include "chrome/browser/printing/print_view_manager_base.h" |
| 10 #include "content/public/browser/web_contents_user_data.h" | 10 #include "content/public/browser/web_contents_user_data.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 #endif // ENABLE_BASIC_PRINTING | 36 #endif // ENABLE_BASIC_PRINTING |
| 37 | 37 |
| 38 // Initiate print preview of the current document by first notifying the | 38 // Initiate print preview of the current document by first notifying the |
| 39 // renderer. Since this happens asynchronous, the print preview dialog | 39 // renderer. Since this happens asynchronous, the print preview dialog |
| 40 // creation will not be completed on the return of this function. Returns | 40 // creation will not be completed on the return of this function. Returns |
| 41 // false if print preview is impossible at the moment. | 41 // false if print preview is impossible at the moment. |
| 42 bool PrintPreviewNow(content::RenderFrameHost* rfh, bool has_selection); | 42 bool PrintPreviewNow(content::RenderFrameHost* rfh, bool has_selection); |
| 43 | 43 |
| 44 // Notify PrintViewManager that print preview is starting in the renderer for | 44 // Notify PrintViewManager that print preview is starting in the renderer for |
| 45 // a particular WebNode. | 45 // a particular WebNode. |
| 46 void PrintPreviewForWebNode(); | 46 void PrintPreviewForWebNode(content::RenderFrameHost* rfh); |
| 47 | 47 |
| 48 // Notify PrintViewManager that print preview has finished. Unfreeze the | 48 // Notify PrintViewManager that print preview has finished. Unfreeze the |
| 49 // renderer in the case of scripted print preview. | 49 // renderer in the case of scripted print preview. |
| 50 void PrintPreviewDone(); | 50 void PrintPreviewDone(); |
| 51 | 51 |
| 52 // content::WebContentsObserver implementation. | 52 // content::WebContentsObserver implementation. |
| 53 void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override; | 53 void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override; |
| 54 void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) override; | 54 void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) override; |
| 55 bool OnMessageReceived(const IPC::Message& message, | 55 bool OnMessageReceived(const IPC::Message& message, |
| 56 content::RenderFrameHost* render_frame_host) override; | 56 content::RenderFrameHost* render_frame_host) override; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 86 | 86 |
| 87 // Keeps track of the pending callback during scripted print preview. | 87 // Keeps track of the pending callback during scripted print preview. |
| 88 content::RenderProcessHost* scripted_print_preview_rph_; | 88 content::RenderProcessHost* scripted_print_preview_rph_; |
| 89 | 89 |
| 90 DISALLOW_COPY_AND_ASSIGN(PrintViewManager); | 90 DISALLOW_COPY_AND_ASSIGN(PrintViewManager); |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 } // namespace printing | 93 } // namespace printing |
| 94 | 94 |
| 95 #endif // CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_H_ | 95 #endif // CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_H_ |
| OLD | NEW |