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 |
278 void RunnableMethodTraits<printing::PrintJobWorker>::RetainCallee( | 281 void RunnableMethodTraits<printing::PrintJobWorker>::RetainCallee( |
279 printing::PrintJobWorker* obj) { | 282 printing::PrintJobWorker* obj) { |
280 DCHECK(!owner_.get()); | 283 DCHECK(!owner_.get()); |
281 owner_ = obj->owner_; | 284 owner_ = obj->owner_; |
282 } | 285 } |
283 | 286 |
284 void RunnableMethodTraits<printing::PrintJobWorker>::ReleaseCallee( | 287 void RunnableMethodTraits<printing::PrintJobWorker>::ReleaseCallee( |
285 printing::PrintJobWorker* obj) { | 288 printing::PrintJobWorker* obj) { |
286 DCHECK_EQ(owner_, obj->owner_); | 289 DCHECK_EQ(owner_, obj->owner_); |
287 owner_ = NULL; | 290 owner_ = NULL; |
288 } | 291 } |
OLD | NEW |