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

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

Issue 6027007: Printing: Get settings on the UI thread on all platforms. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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
« no previous file with comments | « no previous file | chrome/browser/printing/print_job_worker.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_JOB_WORKER_H__ 5 #ifndef CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_H__
6 #define CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_H__ 6 #define CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_H__
7 #pragma once 7 #pragma once
8 8
9 #include "base/ref_counted.h" 9 #include "base/ref_counted.h"
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
11 #include "base/task.h" 11 #include "base/task.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // Renders a page in the printer. 76 // Renders a page in the printer.
77 void SpoolPage(PrintedPage& page); 77 void SpoolPage(PrintedPage& page);
78 78
79 // Closes the job since spooling is done. 79 // Closes the job since spooling is done.
80 void OnDocumentDone(); 80 void OnDocumentDone();
81 81
82 // Discards the current document, the current page and cancels the printing 82 // Discards the current document, the current page and cancels the printing
83 // context. 83 // context.
84 void OnFailure(); 84 void OnFailure();
85 85
86 #if defined(OS_POSIX)
87 // Asks the user for print settings. Must be called on the UI thread. 86 // Asks the user for print settings. Must be called on the UI thread.
88 // Mac and Linux-only since Windows can display UI from non-main threads. 87 // Required on Mac and Linux. Windows can display UI from non-main threads,
88 // but sticks with this for consistency.
89 void GetSettingsWithUI(gfx::NativeView parent_view, 89 void GetSettingsWithUI(gfx::NativeView parent_view,
90 int document_page_count, 90 int document_page_count,
91 bool has_selection); 91 bool has_selection);
92 92
93 // The callback used by PrintingContext::GetSettingsWithUI() to notify this 93 // The callback used by PrintingContext::GetSettingsWithUI() to notify this
94 // object that the print settings are set. This is needed in order to bounce 94 // object that the print settings are set. This is needed in order to bounce
95 // back into the IO thread for GetSettingsDone(). 95 // back into the IO thread for GetSettingsDone().
96 void GetSettingsWithUIDone(PrintingContext::Result result); 96 void GetSettingsWithUIDone(PrintingContext::Result result);
97 #endif // defined(OS_POSIX)
98 97
99 // Reports settings back to owner_. 98 // Reports settings back to owner_.
100 void GetSettingsDone(PrintingContext::Result result); 99 void GetSettingsDone(PrintingContext::Result result);
101 100
102 // Use the default settings. When using GTK+ or Mac, this can still end up 101 // Use the default settings. When using GTK+ or Mac, this can still end up
103 // displaying a dialog. So this needs to happen from the UI thread on these 102 // displaying a dialog. So this needs to happen from the UI thread on these
104 // systems. 103 // systems.
105 void UseDefaultSettings(); 104 void UseDefaultSettings();
106 105
107 // Information about the printer setting. 106 // Information about the printer setting.
(...skipping 16 matching lines...) Expand all
124 123
125 template <> 124 template <>
126 struct RunnableMethodTraits<printing::PrintJobWorker> { 125 struct RunnableMethodTraits<printing::PrintJobWorker> {
127 void RetainCallee(printing::PrintJobWorker* obj); 126 void RetainCallee(printing::PrintJobWorker* obj);
128 void ReleaseCallee(printing::PrintJobWorker* obj); 127 void ReleaseCallee(printing::PrintJobWorker* obj);
129 private: 128 private:
130 scoped_refptr<printing::PrintJobWorkerOwner> owner_; 129 scoped_refptr<printing::PrintJobWorkerOwner> owner_;
131 }; 130 };
132 131
133 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_H__ 132 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_H__
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/printing/print_job_worker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698