| Index: chrome/browser/printing/print_preview_message_handler.h
|
| diff --git a/chrome/browser/printing/print_preview_message_handler.h b/chrome/browser/printing/print_preview_message_handler.h
|
| index 2a776b470219c3552cf5585f2ff08dbebbdac65a..b1340f37b54c827e78306159878e374cb38cbed2 100644
|
| --- a/chrome/browser/printing/print_preview_message_handler.h
|
| +++ b/chrome/browser/printing/print_preview_message_handler.h
|
| @@ -6,6 +6,7 @@
|
| #define CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_
|
|
|
| #include "base/compiler_specific.h"
|
| +#include "chrome/browser/tab_contents/web_contents_user_data.h"
|
| #include "content/public/browser/web_contents_observer.h"
|
|
|
| class PrintPreviewUI;
|
| @@ -22,24 +23,24 @@ namespace printing {
|
|
|
| struct PageSizeMargins;
|
|
|
| -// TabContents offloads print preview message handling to
|
| -// PrintPreviewMessageHandler. This object has the same life time as the
|
| -// TabContents that owns it.
|
| -class PrintPreviewMessageHandler : public content::WebContentsObserver {
|
| +// Manages the print preview handling for a WebContents.
|
| +class PrintPreviewMessageHandler
|
| + : public content::WebContentsObserver,
|
| + public WebContentsUserData<PrintPreviewMessageHandler> {
|
| public:
|
| - explicit PrintPreviewMessageHandler(content::WebContents* web_contents);
|
| virtual ~PrintPreviewMessageHandler();
|
|
|
| // content::WebContentsObserver implementation.
|
| virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
|
|
|
| private:
|
| + explicit PrintPreviewMessageHandler(content::WebContents* web_contents);
|
| + static int kUserDataKey;
|
| + friend class WebContentsUserData<PrintPreviewMessageHandler>;
|
| +
|
| // Gets the print preview tab associated with the WebContents being observed.
|
| TabContents* GetPrintPreviewTab();
|
|
|
| - // Helper function to return the TabContents for web_contents().
|
| - TabContents* tab_contents();
|
| -
|
| // Gets the PrintPreviewUI associated with the WebContents being observed.
|
| PrintPreviewUI* GetPrintPreviewUI();
|
|
|
|
|