Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1289)

Side by Side Diff: chrome/browser/printing/print_preview_message_handler.h

Issue 6334010: Print Preview: Store preview data in the print preview handler.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_
6 #define CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_
7 #pragma once
8
9 #include "chrome/browser/tab_contents/tab_contents_observer.h"
10
11 struct ViewHostMsg_DidPreviewDocument_Params;
12
13 namespace printing {
14
15 // TabContents offloads print preview message handling to
16 // PrintPreviewMessageHandler. This object has the same life time as the
17 // TabContents that owns it.
18 class PrintPreviewMessageHandler : public TabContentsObserver {
19 public:
20 explicit PrintPreviewMessageHandler(TabContents* owner);
21 virtual ~PrintPreviewMessageHandler();
22
23 void OnPagesReadyForPreview(
24 const ViewHostMsg_DidPreviewDocument_Params& params);
25
26 // TabContentsObserver implementation.
27 virtual bool OnMessageReceived(const IPC::Message& message);
28
29 private:
30 // Get the print preview tab associated with |owner_| or create a new print
31 // preview tab if necessary.
32 TabContents* GetOrCreatePrintPreviewTab();
33
34 // The TabContents that owns this PrintPreviewMessageHandler.
35 TabContents* owner_;
36
37 DISALLOW_COPY_AND_ASSIGN(PrintPreviewMessageHandler);
38 };
39
40 } // namespace printing
41
42 #endif // CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698