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

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

Issue 125082: Add Print Selection support to Chrome. This change is fairly involved since ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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_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 7
8 #include "base/task.h" 8 #include "base/task.h"
9 #include "base/thread.h" 9 #include "base/thread.h"
10 #include "chrome/browser/printing/page_number.h" 10 #include "chrome/browser/printing/page_number.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // NOTIFY_PRINTED_DOCUMENT_UPDATED notification. It's time to look again if 48 // NOTIFY_PRINTED_DOCUMENT_UPDATED notification. It's time to look again if
49 // the next page can be printed. 49 // the next page can be printed.
50 void OnNewPage(); 50 void OnNewPage();
51 51
52 // This is the only function that can be called in a thread. 52 // This is the only function that can be called in a thread.
53 void Cancel(); 53 void Cancel();
54 54
55 // Cancels the Print... dialog box if shown, noop otherwise. 55 // Cancels the Print... dialog box if shown, noop otherwise.
56 void DismissDialog(); 56 void DismissDialog();
57 57
58 // Requests the missing pages in rendered_document_. Sends back a
59 // ALL_PAGES_REQUESTED notification once done.
60 void RequestMissingPages();
61
62 protected: 58 protected:
63 // Retrieves the context for testing only. 59 // Retrieves the context for testing only.
64 PrintingContext& printing_context() { return printing_context_; } 60 PrintingContext& printing_context() { return printing_context_; }
65 61
66 private: 62 private:
67 // The shared NotificationService service can only be accessed from the UI 63 // The shared NotificationService service can only be accessed from the UI
68 // thread, so this class encloses the necessary information to send the 64 // thread, so this class encloses the necessary information to send the
69 // notification from the right thread. Most NOTIFY_PRINT_JOB_EVENT 65 // notification from the right thread. Most NOTIFY_PRINT_JOB_EVENT
70 // notifications are sent this way, except USER_INIT_DONE, USER_INIT_CANCELED 66 // notifications are sent this way, except USER_INIT_DONE, USER_INIT_CANCELED
71 // and DEFAULT_INIT_DONE. These three are sent through PrintJob::InitDone(). 67 // and DEFAULT_INIT_DONE. These three are sent through PrintJob::InitDone().
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 template <> 99 template <>
104 struct RunnableMethodTraits<printing::PrintJobWorker> { 100 struct RunnableMethodTraits<printing::PrintJobWorker> {
105 RunnableMethodTraits(); 101 RunnableMethodTraits();
106 void RetainCallee(printing::PrintJobWorker* obj); 102 void RetainCallee(printing::PrintJobWorker* obj);
107 void ReleaseCallee(printing::PrintJobWorker* obj); 103 void ReleaseCallee(printing::PrintJobWorker* obj);
108 private: 104 private:
109 scoped_refptr<printing::PrintJobWorkerOwner> owner_; 105 scoped_refptr<printing::PrintJobWorkerOwner> owner_;
110 }; 106 };
111 107
112 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_H__ 108 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_H__
OLDNEW
« no previous file with comments | « chrome/browser/printing/page_range_unittest.cc ('k') | chrome/browser/printing/print_job_worker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698