| Index: chrome/browser/printing/print_preview_message_handler.h
|
| ===================================================================
|
| --- chrome/browser/printing/print_preview_message_handler.h (revision 0)
|
| +++ chrome/browser/printing/print_preview_message_handler.h (revision 0)
|
| @@ -0,0 +1,42 @@
|
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_
|
| +#define CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_
|
| +#pragma once
|
| +
|
| +#include "chrome/browser/tab_contents/tab_contents_observer.h"
|
| +
|
| +struct ViewHostMsg_DidPreviewDocument_Params;
|
| +
|
| +namespace printing {
|
| +
|
| +// TabContents offloads print preview message handling to
|
| +// PrintPreviewMessageHandler. This object has the same life time as the
|
| +// TabContents that owns it.
|
| +class PrintPreviewMessageHandler : public TabContentsObserver {
|
| + public:
|
| + explicit PrintPreviewMessageHandler(TabContents* owner);
|
| + virtual ~PrintPreviewMessageHandler();
|
| +
|
| + void OnPagesReadyForPreview(
|
| + const ViewHostMsg_DidPreviewDocument_Params& params);
|
| +
|
| + // TabContentsObserver implementation.
|
| + virtual bool OnMessageReceived(const IPC::Message& message);
|
| +
|
| + private:
|
| + // Get the print preview tab associated with |owner_| or create a new print
|
| + // preview tab if necessary.
|
| + TabContents* GetOrCreatePrintPreviewTab();
|
| +
|
| + // The TabContents that owns this PrintPreviewMessageHandler.
|
| + TabContents* owner_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(PrintPreviewMessageHandler);
|
| +};
|
| +
|
| +} // namespace printing
|
| +
|
| +#endif // CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_
|
|
|
| Property changes on: chrome/browser/printing/print_preview_message_handler.h
|
| ___________________________________________________________________
|
| Added: svn:eol-style
|
| + LF
|
|
|
|
|