| 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_PREVIEW_MESSAGE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_ |
| 6 #define CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_ | 6 #define CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "content/public/browser/web_contents_observer.h" | 9 #include "content/public/browser/web_contents_observer.h" |
| 10 #include "content/public/browser/web_contents_user_data.h" | 10 #include "content/public/browser/web_contents_user_data.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 struct PageSizeMargins; | 29 struct PageSizeMargins; |
| 30 | 30 |
| 31 // Manages the print preview handling for a WebContents. | 31 // Manages the print preview handling for a WebContents. |
| 32 class PrintPreviewMessageHandler | 32 class PrintPreviewMessageHandler |
| 33 : public content::WebContentsObserver, | 33 : public content::WebContentsObserver, |
| 34 public content::WebContentsUserData<PrintPreviewMessageHandler> { | 34 public content::WebContentsUserData<PrintPreviewMessageHandler> { |
| 35 public: | 35 public: |
| 36 virtual ~PrintPreviewMessageHandler(); | 36 virtual ~PrintPreviewMessageHandler(); |
| 37 | 37 |
| 38 // content::WebContentsObserver implementation. | 38 // content::WebContentsObserver implementation. |
| 39 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 39 virtual bool OnMessageReceived(const IPC::Message& message) override; |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 explicit PrintPreviewMessageHandler(content::WebContents* web_contents); | 42 explicit PrintPreviewMessageHandler(content::WebContents* web_contents); |
| 43 friend class content::WebContentsUserData<PrintPreviewMessageHandler>; | 43 friend class content::WebContentsUserData<PrintPreviewMessageHandler>; |
| 44 | 44 |
| 45 // Gets the print preview dialog associated with the WebContents being | 45 // Gets the print preview dialog associated with the WebContents being |
| 46 // observed. | 46 // observed. |
| 47 content::WebContents* GetPrintPreviewDialog(); | 47 content::WebContents* GetPrintPreviewDialog(); |
| 48 | 48 |
| 49 // Gets the PrintPreviewUI associated with the WebContents being observed. | 49 // Gets the PrintPreviewUI associated with the WebContents being observed. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 66 void OnInvalidPrinterSettings(int document_cookie); | 66 void OnInvalidPrinterSettings(int document_cookie); |
| 67 void OnSetOptionsFromDocument( | 67 void OnSetOptionsFromDocument( |
| 68 const PrintHostMsg_SetOptionsFromDocument_Params& params); | 68 const PrintHostMsg_SetOptionsFromDocument_Params& params); |
| 69 | 69 |
| 70 DISALLOW_COPY_AND_ASSIGN(PrintPreviewMessageHandler); | 70 DISALLOW_COPY_AND_ASSIGN(PrintPreviewMessageHandler); |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 } // namespace printing | 73 } // namespace printing |
| 74 | 74 |
| 75 #endif // CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_ | 75 #endif // CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_ |
| OLD | NEW |