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

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

Issue 10829463: Print preview: Handle all tab navigations in PrintPreviewTabController instead of in two places. Ha… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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) 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 10
(...skipping 14 matching lines...) Expand all
25 // TabContents offloads print preview message handling to 25 // TabContents offloads print preview message handling to
26 // PrintPreviewMessageHandler. This object has the same life time as the 26 // PrintPreviewMessageHandler. This object has the same life time as the
27 // TabContents that owns it. 27 // TabContents that owns it.
28 class PrintPreviewMessageHandler : public content::WebContentsObserver { 28 class PrintPreviewMessageHandler : public content::WebContentsObserver {
29 public: 29 public:
30 explicit PrintPreviewMessageHandler(content::WebContents* web_contents); 30 explicit PrintPreviewMessageHandler(content::WebContents* web_contents);
31 virtual ~PrintPreviewMessageHandler(); 31 virtual ~PrintPreviewMessageHandler();
32 32
33 // content::WebContentsObserver implementation. 33 // content::WebContentsObserver implementation.
34 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 34 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
35 virtual void NavigateToPendingEntry(const GURL& url,
36 content::NavigationController::ReloadType reload_type) OVERRIDE;
37 35
38 private: 36 private:
39 // Gets the print preview tab associated with the WebContents being observed. 37 // Gets the print preview tab associated with the WebContents being observed.
40 TabContents* GetPrintPreviewTab(); 38 TabContents* GetPrintPreviewTab();
41 39
42 // Helper function to return the TabContents for web_contents(). 40 // Helper function to return the TabContents for web_contents().
43 TabContents* tab_contents(); 41 TabContents* tab_contents();
44 42
45 // Gets the PrintPreviewUI associated with the WebContents being observed. 43 // Gets the PrintPreviewUI associated with the WebContents being observed.
46 PrintPreviewUI* GetPrintPreviewUI(); 44 PrintPreviewUI* GetPrintPreviewUI();
(...skipping 13 matching lines...) Expand all
60 void OnPrintPreviewCancelled(int document_cookie); 58 void OnPrintPreviewCancelled(int document_cookie);
61 void OnInvalidPrinterSettings(int document_cookie); 59 void OnInvalidPrinterSettings(int document_cookie);
62 void OnPrintPreviewScalingDisabled(); 60 void OnPrintPreviewScalingDisabled();
63 61
64 DISALLOW_COPY_AND_ASSIGN(PrintPreviewMessageHandler); 62 DISALLOW_COPY_AND_ASSIGN(PrintPreviewMessageHandler);
65 }; 63 };
66 64
67 } // namespace printing 65 } // namespace printing
68 66
69 #endif // CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_ 67 #endif // CHROME_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698