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

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

Issue 10993064: Make using WebContentsUserData simpler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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) 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_VIEW_MANAGER_H_ 5 #ifndef CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_H_
6 #define CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_H_ 6 #define CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "chrome/browser/api/prefs/pref_member.h" 10 #include "chrome/browser/api/prefs/pref_member.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 93 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
94 94
95 // Terminates or cancels the print job if one was pending. 95 // Terminates or cancels the print job if one was pending.
96 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; 96 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE;
97 97
98 // Cancels the print job. 98 // Cancels the print job.
99 virtual void StopNavigation() OVERRIDE; 99 virtual void StopNavigation() OVERRIDE;
100 100
101 private: 101 private:
102 explicit PrintViewManager(content::WebContents* web_contents); 102 explicit PrintViewManager(content::WebContents* web_contents);
103 static int kUserDataKey;
104 friend class WebContentsUserData<PrintViewManager>; 103 friend class WebContentsUserData<PrintViewManager>;
105 104
106 enum PrintPreviewState { 105 enum PrintPreviewState {
107 NOT_PREVIEWING, 106 NOT_PREVIEWING,
108 USER_INITIATED_PREVIEW, 107 USER_INITIATED_PREVIEW,
109 SCRIPTED_PREVIEW, 108 SCRIPTED_PREVIEW,
110 }; 109 };
111 110
112 // IPC Message handlers. 111 // IPC Message handlers.
113 void OnDidGetPrintedPagesCount(int cookie, int number_pages); 112 void OnDidGetPrintedPagesCount(int cookie, int number_pages);
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 212
214 // Whether our content is in blocked state. 213 // Whether our content is in blocked state.
215 bool tab_content_blocked_; 214 bool tab_content_blocked_;
216 215
217 DISALLOW_COPY_AND_ASSIGN(PrintViewManager); 216 DISALLOW_COPY_AND_ASSIGN(PrintViewManager);
218 }; 217 };
219 218
220 } // namespace printing 219 } // namespace printing
221 220
222 #endif // CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_H_ 221 #endif // CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698