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

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

Issue 20015: Make it easier to create new IPC channel types (i.e. renderer/plugin). Inste... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/ref_counted.h"
8 #include "chrome/browser/printing/printed_pages_source.h" 9 #include "chrome/browser/printing/printed_pages_source.h"
9 #include "chrome/common/notification_observer.h" 10 #include "chrome/common/notification_observer.h"
10 #include "chrome/common/render_messages.h"
11 11
12 class RenderViewHost; 12 class RenderViewHost;
13 class WebContents; 13 class WebContents;
14 struct ViewHostMsg_DidPrintPage_Params;
14 15
15 namespace printing { 16 namespace printing {
16 17
17 class JobEventDetails; 18 class JobEventDetails;
18 class PrintJob; 19 class PrintJob;
19 class PrintJobWorkerOwner; 20 class PrintJobWorkerOwner;
20 21
21 // Manages the print commands in relation to a WebContents. WebContents 22 // Manages the print commands in relation to a WebContents. WebContents
22 // delegates a few printing related commands to this instance. 23 // delegates a few printing related commands to this instance.
23 class PrintViewManager : public NotificationObserver, 24 class PrintViewManager : public NotificationObserver,
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // while the blocking inner message loop is running. This is useful in cases 112 // while the blocking inner message loop is running. This is useful in cases
112 // where the RenderView is about to be destroyed while a printing job isn't 113 // where the RenderView is about to be destroyed while a printing job isn't
113 // finished. 114 // finished.
114 bool RunInnerMessageLoop(); 115 bool RunInnerMessageLoop();
115 116
116 // In the case of Scripted Printing, where the renderer is controlling the 117 // In the case of Scripted Printing, where the renderer is controlling the
117 // control flow, print_job_ is initialized whenever possible. No-op is 118 // control flow, print_job_ is initialized whenever possible. No-op is
118 // print_job_ is initialized. 119 // print_job_ is initialized.
119 bool OpportunisticallyCreatePrintJob(int cookie); 120 bool OpportunisticallyCreatePrintJob(int cookie);
120 121
121 // Cache the last print settings requested to the renderer.
122 ViewMsg_Print_Params print_params_;
123
124 // Manages the low-level talk to the printer. 122 // Manages the low-level talk to the printer.
125 scoped_refptr<PrintJob> print_job_; 123 scoped_refptr<PrintJob> print_job_;
126 124
127 // Waiting for print_job_ initialization to be completed to start printing. 125 // Waiting for print_job_ initialization to be completed to start printing.
128 // Specifically the DEFAULT_INIT_DONE notification. Set when PrintNow() is 126 // Specifically the DEFAULT_INIT_DONE notification. Set when PrintNow() is
129 // called. 127 // called.
130 bool waiting_to_print_; 128 bool waiting_to_print_;
131 129
132 // Running an inner message loop inside RenderAllMissingPagesNow(). This means 130 // Running an inner message loop inside RenderAllMissingPagesNow(). This means
133 // we are _blocking_ until all the necessary pages have been rendered or the 131 // we are _blocking_ until all the necessary pages have been rendered or the
(...skipping 25 matching lines...) Expand all
159 // printing-related behavior. Still, access to the renderer is needed so a 157 // printing-related behavior. Still, access to the renderer is needed so a
160 // back reference is kept the the "parent object". 158 // back reference is kept the the "parent object".
161 WebContents& owner_; 159 WebContents& owner_;
162 160
163 DISALLOW_COPY_AND_ASSIGN(PrintViewManager); 161 DISALLOW_COPY_AND_ASSIGN(PrintViewManager);
164 }; 162 };
165 163
166 } // namespace printing 164 } // namespace printing
167 165
168 #endif // CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_H_ 166 #endif // CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/browser_accessibility_manager.cc ('k') | chrome/browser/printing/print_view_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698