OLD | NEW |
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 #include "chrome/browser/printing/print_job_worker.h" | 5 #include "chrome/browser/printing/print_job_worker.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "chrome/browser/printing/print_job.h" | 8 #include "chrome/browser/printing/print_job.h" |
9 #include "chrome/common/notification_service.h" | 9 #include "chrome/common/notification_service.h" |
10 #include "printing/printed_document.h" | 10 #include "printing/printed_document.h" |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 owner_->message_loop()->PostTask(FROM_HERE, task); | 268 owner_->message_loop()->PostTask(FROM_HERE, task); |
269 Cancel(); | 269 Cancel(); |
270 | 270 |
271 // Makes sure the variables are reinitialized. | 271 // Makes sure the variables are reinitialized. |
272 document_ = NULL; | 272 document_ = NULL; |
273 page_number_ = PageNumber::npos(); | 273 page_number_ = PageNumber::npos(); |
274 } | 274 } |
275 | 275 |
276 } // namespace printing | 276 } // namespace printing |
277 | 277 |
278 RunnableMethodTraits<printing::PrintJobWorker>::RunnableMethodTraits() { | |
279 } | |
280 | |
281 void RunnableMethodTraits<printing::PrintJobWorker>::RetainCallee( | 278 void RunnableMethodTraits<printing::PrintJobWorker>::RetainCallee( |
282 printing::PrintJobWorker* obj) { | 279 printing::PrintJobWorker* obj) { |
283 DCHECK(!owner_.get()); | 280 DCHECK(!owner_.get()); |
284 owner_ = obj->owner_; | 281 owner_ = obj->owner_; |
285 } | 282 } |
286 | 283 |
287 void RunnableMethodTraits<printing::PrintJobWorker>::ReleaseCallee( | 284 void RunnableMethodTraits<printing::PrintJobWorker>::ReleaseCallee( |
288 printing::PrintJobWorker* obj) { | 285 printing::PrintJobWorker* obj) { |
289 DCHECK_EQ(owner_, obj->owner_); | 286 DCHECK_EQ(owner_, obj->owner_); |
290 owner_ = NULL; | 287 owner_ = NULL; |
291 } | 288 } |
OLD | NEW |