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

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

Issue 1083433003: Fix crash from ipc_fuzzer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fri Apr 10 17:22:28 PDT 2015 Created 5 years, 8 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
« 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) 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_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/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 void OnFailure(); 107 void OnFailure();
108 108
109 // Asks the user for print settings. Must be called on the UI thread. 109 // Asks the user for print settings. Must be called on the UI thread.
110 // Required on Mac and Linux. Windows can display UI from non-main threads, 110 // Required on Mac and Linux. Windows can display UI from non-main threads,
111 // but sticks with this for consistency. 111 // but sticks with this for consistency.
112 void GetSettingsWithUI( 112 void GetSettingsWithUI(
113 int document_page_count, 113 int document_page_count,
114 bool has_selection, 114 bool has_selection,
115 bool is_scripted); 115 bool is_scripted);
116 116
117 // The callback used by PrintingContext::GetSettingsWithUI() to notify this
118 // object that the print settings are set. This is needed in order to bounce
119 // back into the IO thread for GetSettingsDone().
120 void GetSettingsWithUIDone(PrintingContext::Result result);
121
122 // Called on the UI thread to update the print settings. 117 // Called on the UI thread to update the print settings.
123 void UpdatePrintSettings(scoped_ptr<base::DictionaryValue> new_settings); 118 void UpdatePrintSettings(scoped_ptr<base::DictionaryValue> new_settings);
124 119
125 // Reports settings back to owner_. 120 // Reports settings back to owner_.
126 void GetSettingsDone(PrintingContext::Result result); 121 void GetSettingsDone(PrintingContext::Result result);
127 122
128 // Use the default settings. When using GTK+ or Mac, this can still end up 123 // Use the default settings. When using GTK+ or Mac, this can still end up
129 // displaying a dialog. So this needs to happen from the UI thread on these 124 // displaying a dialog. So this needs to happen from the UI thread on these
130 // systems. 125 // systems.
131 void UseDefaultSettings(); 126 void UseDefaultSettings();
(...skipping 22 matching lines...) Expand all
154 149
155 // Used to generate a WeakPtr for callbacks. 150 // Used to generate a WeakPtr for callbacks.
156 base::WeakPtrFactory<PrintJobWorker> weak_factory_; 151 base::WeakPtrFactory<PrintJobWorker> weak_factory_;
157 152
158 DISALLOW_COPY_AND_ASSIGN(PrintJobWorker); 153 DISALLOW_COPY_AND_ASSIGN(PrintJobWorker);
159 }; 154 };
160 155
161 } // namespace printing 156 } // namespace printing
162 157
163 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_H_ 158 #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