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

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

Issue 8201027: Move margin processing code to the browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address nits Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/task.h" 11 #include "base/task.h"
12 #include "base/threading/thread.h" 12 #include "base/threading/thread.h"
13 #include "printing/page_number.h" 13 #include "printing/page_number.h"
14 #include "printing/printing_context.h" 14 #include "printing/printing_context.h"
15 #include "printing/print_job_constants.h"
15 #include "ui/gfx/native_widget_types.h" 16 #include "ui/gfx/native_widget_types.h"
16 17
17 namespace base { 18 namespace base {
18 class DictionaryValue; 19 class DictionaryValue;
19 } 20 }
20 21
21 namespace printing { 22 namespace printing {
22 23
23 class PrintedDocument; 24 class PrintedDocument;
24 class PrintedPage; 25 class PrintedPage;
(...skipping 12 matching lines...) Expand all
37 virtual ~PrintJobWorker(); 38 virtual ~PrintJobWorker();
38 39
39 void SetNewOwner(PrintJobWorkerOwner* new_owner); 40 void SetNewOwner(PrintJobWorkerOwner* new_owner);
40 41
41 // Initializes the print settings. If |ask_user_for_settings| is true, a 42 // Initializes the print settings. If |ask_user_for_settings| is true, a
42 // Print... dialog box will be shown to ask the user his preference. 43 // Print... dialog box will be shown to ask the user his preference.
43 void GetSettings(bool ask_user_for_settings, 44 void GetSettings(bool ask_user_for_settings,
44 gfx::NativeView parent_view, 45 gfx::NativeView parent_view,
45 int document_page_count, 46 int document_page_count,
46 bool has_selection, 47 bool has_selection,
47 bool use_overlays); 48 MarginType margin_type);
48 49
49 // Set the new print settings. This function takes ownership of 50 // Set the new print settings. This function takes ownership of
50 // |new_settings|. 51 // |new_settings|.
51 void SetSettings(const base::DictionaryValue* const new_settings); 52 void SetSettings(const base::DictionaryValue* const new_settings);
52 53
53 // Starts the printing loop. Every pages are printed as soon as the data is 54 // Starts the printing loop. Every pages are printed as soon as the data is
54 // available. Makes sure the new_document is the right one. 55 // available. Makes sure the new_document is the right one.
55 void StartPrinting(PrintedDocument* new_document); 56 void StartPrinting(PrintedDocument* new_document);
56 57
57 // Updates the printed document. 58 // Updates the printed document.
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 133
133 template <> 134 template <>
134 struct RunnableMethodTraits<printing::PrintJobWorker> { 135 struct RunnableMethodTraits<printing::PrintJobWorker> {
135 void RetainCallee(printing::PrintJobWorker* obj); 136 void RetainCallee(printing::PrintJobWorker* obj);
136 void ReleaseCallee(printing::PrintJobWorker* obj); 137 void ReleaseCallee(printing::PrintJobWorker* obj);
137 private: 138 private:
138 scoped_refptr<printing::PrintJobWorkerOwner> owner_; 139 scoped_refptr<printing::PrintJobWorkerOwner> owner_;
139 }; 140 };
140 141
141 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_H__ 142 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_H__
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_dialog_gtk.cc ('k') | chrome/browser/printing/print_job_worker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698