| OLD | NEW |
| 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "base/message_loop.h" | 5 #include "base/message_loop.h" |
| 6 #include "chrome/browser/printing/print_job.h" | 6 #include "chrome/browser/printing/print_job.h" |
| 7 #include "chrome/browser/printing/print_job_worker.h" | 7 #include "chrome/browser/printing/print_job_worker.h" |
| 8 #include "chrome/common/notification_registrar.h" | 8 #include "chrome/common/notification_registrar.h" |
| 9 #include "chrome/common/notification_service.h" | 9 #include "chrome/common/notification_service.h" |
| 10 #include "printing/printed_pages_source.h" | 10 #include "printing/printed_pages_source.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 } | 56 } |
| 57 virtual int cookie() const { | 57 virtual int cookie() const { |
| 58 return 42; | 58 return 42; |
| 59 } | 59 } |
| 60 private: | 60 private: |
| 61 printing::PrintSettings settings_; | 61 printing::PrintSettings settings_; |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 class TestPrintJob : public printing::PrintJob { | 64 class TestPrintJob : public printing::PrintJob { |
| 65 public: | 65 public: |
| 66 TestPrintJob(volatile bool* check) : check_(check) { | 66 explicit TestPrintJob(volatile bool* check) : check_(check) { |
| 67 } | 67 } |
| 68 ~TestPrintJob() { | 68 ~TestPrintJob() { |
| 69 *check_ = true; | 69 *check_ = true; |
| 70 } | 70 } |
| 71 private: | 71 private: |
| 72 volatile bool* check_; | 72 volatile bool* check_; |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 class TestPrintNotifObserv : public NotificationObserver { | 75 class TestPrintNotifObserv : public NotificationObserver { |
| 76 public: | 76 public: |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 job->is_print_dialog_box_shown(); | 131 job->is_print_dialog_box_shown(); |
| 132 job->document(); | 132 job->document(); |
| 133 // Private | 133 // Private |
| 134 job->UpdatePrintedDocument(NULL); | 134 job->UpdatePrintedDocument(NULL); |
| 135 scoped_refptr<printing::JobEventDetails> event_details; | 135 scoped_refptr<printing::JobEventDetails> event_details; |
| 136 job->OnNotifyPrintJobEvent(event_details); | 136 job->OnNotifyPrintJobEvent(event_details); |
| 137 job->OnDocumentDone(); | 137 job->OnDocumentDone(); |
| 138 job->ControlledWorkerShutdown(); | 138 job->ControlledWorkerShutdown(); |
| 139 */ | 139 */ |
| 140 } | 140 } |
| OLD | NEW |