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

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

Issue 8136027: Print Preview: Make print preview tab modal. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase, more fixes Created 9 years, 2 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "content/browser/tab_contents/tab_contents_observer.h" 10 #include "content/browser/tab_contents/tab_contents_observer.h"
(...skipping 12 matching lines...) Expand all
23 // PrintPreviewMessageHandler. This object has the same life time as the 23 // PrintPreviewMessageHandler. This object has the same life time as the
24 // TabContents that owns it. 24 // TabContents that owns it.
25 class PrintPreviewMessageHandler : public TabContentsObserver { 25 class PrintPreviewMessageHandler : public TabContentsObserver {
26 public: 26 public:
27 explicit PrintPreviewMessageHandler(TabContents* tab_contents); 27 explicit PrintPreviewMessageHandler(TabContents* tab_contents);
28 virtual ~PrintPreviewMessageHandler(); 28 virtual ~PrintPreviewMessageHandler();
29 29
30 // TabContentsObserver implementation. 30 // TabContentsObserver implementation.
31 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 31 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
32 virtual void DidStartLoading() OVERRIDE; 32 virtual void DidStartLoading() OVERRIDE;
33 virtual void NavigateToPendingEntry(const GURL& url,
34 NavigationController::ReloadType reload_type) OVERRIDE;
33 35
34 private: 36 private:
35 // Gets the print preview tab associated with the TabContents being observed. 37 // Gets the print preview tab associated with the TabContents being observed.
36 TabContentsWrapper* GetPrintPreviewTab(); 38 TabContentsWrapper* GetPrintPreviewTab();
37 39
38 // Helper function to return the TabContentsWrapper for tab_contents(). 40 // Helper function to return the TabContentsWrapper for tab_contents().
39 TabContentsWrapper* tab_contents_wrapper(); 41 TabContentsWrapper* tab_contents_wrapper();
40 42
41 // Common code between failure handlers. Returns a PrintPreviewUI* if there 43 // Common code between failure handlers. Returns a PrintPreviewUI* if there
42 // exists a PrintPreviewUI to send messages to. 44 // exists a PrintPreviewUI to send messages to.
(...skipping 11 matching lines...) Expand all
54 void OnPrintPreviewFailed(int document_cookie); 56 void OnPrintPreviewFailed(int document_cookie);
55 void OnPrintPreviewCancelled(int document_cookie); 57 void OnPrintPreviewCancelled(int document_cookie);
56 void OnInvalidPrinterSettings(int document_cookie); 58 void OnInvalidPrinterSettings(int document_cookie);
57 59
58 DISALLOW_COPY_AND_ASSIGN(PrintPreviewMessageHandler); 60 DISALLOW_COPY_AND_ASSIGN(PrintPreviewMessageHandler);
59 }; 61 };
60 62
61 } // namespace printing 63 } // namespace printing
62 64
63 #endif // CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_ 65 #endif // CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698