| 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.h" | 5 #include "chrome/browser/printing/print_job.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/timer.h" | 8 #include "base/timer.h" |
| 9 #include "chrome/browser/printing/print_job_worker.h" | 9 #include "chrome/browser/printing/print_job_worker.h" |
| 10 #include "chrome/common/notification_service.h" | 10 #include "chrome/common/notification_service.h" |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 // Note that we don't do any kind of message priorization since we don't | 310 // Note that we don't do any kind of message priorization since we don't |
| 311 // execute any pending task or timer. | 311 // execute any pending task or timer. |
| 312 DWORD result = MsgWaitForMultipleObjects(1, &thread_handle, | 312 DWORD result = MsgWaitForMultipleObjects(1, &thread_handle, |
| 313 FALSE, INFINITE, QS_ALLINPUT); | 313 FALSE, INFINITE, QS_ALLINPUT); |
| 314 if (result == WAIT_OBJECT_0 + 1) { | 314 if (result == WAIT_OBJECT_0 + 1) { |
| 315 while (PeekMessage(&msg, NULL, 0, 0, TRUE) > 0) { | 315 while (PeekMessage(&msg, NULL, 0, 0, TRUE) > 0) { |
| 316 TranslateMessage(&msg); | 316 TranslateMessage(&msg); |
| 317 DispatchMessage(&msg); | 317 DispatchMessage(&msg); |
| 318 } | 318 } |
| 319 // Continue looping. | 319 // Continue looping. |
| 320 } | 320 } else if (result == WAIT_OBJECT_0) { |
| 321 else if (result == WAIT_OBJECT_0) { | |
| 322 // The thread quit. | 321 // The thread quit. |
| 323 break; | 322 break; |
| 324 } else { | 323 } else { |
| 325 // An error occured. Assume the thread quit. | 324 // An error occured. Assume the thread quit. |
| 326 NOTREACHED(); | 325 NOTREACHED(); |
| 327 break; | 326 break; |
| 328 } | 327 } |
| 329 } | 328 } |
| 330 #endif | 329 #endif |
| 331 | 330 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 347 | 346 |
| 348 PrintedDocument* JobEventDetails::document() const { | 347 PrintedDocument* JobEventDetails::document() const { |
| 349 return document_; | 348 return document_; |
| 350 } | 349 } |
| 351 | 350 |
| 352 PrintedPage* JobEventDetails::page() const { | 351 PrintedPage* JobEventDetails::page() const { |
| 353 return page_; | 352 return page_; |
| 354 } | 353 } |
| 355 | 354 |
| 356 } // namespace printing | 355 } // namespace printing |
| OLD | NEW |