| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/printer_query.h" | 5 #include "chrome/browser/printing/printer_query.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/threading/thread_restrictions.h" | 8 #include "base/threading/thread_restrictions.h" |
| 9 #include "chrome/browser/printing/print_job_worker.h" | 9 #include "chrome/browser/printing/print_job_worker.h" |
| 10 | 10 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 if (worker_.get()) { | 111 if (worker_.get()) { |
| 112 // http://crbug.com/66082: We're blocking on the PrinterQuery's worker | 112 // http://crbug.com/66082: We're blocking on the PrinterQuery's worker |
| 113 // thread. It's not clear to me if this may result in blocking the current | 113 // thread. It's not clear to me if this may result in blocking the current |
| 114 // thread for an unacceptable time. We should probably fix it. | 114 // thread for an unacceptable time. We should probably fix it. |
| 115 base::ThreadRestrictions::ScopedAllowIO allow_io; | 115 base::ThreadRestrictions::ScopedAllowIO allow_io; |
| 116 worker_->Stop(); | 116 worker_->Stop(); |
| 117 worker_.reset(); | 117 worker_.reset(); |
| 118 } | 118 } |
| 119 } | 119 } |
| 120 | 120 |
| 121 bool PrinterQuery::is_print_dialog_box_shown() const { | |
| 122 return is_print_dialog_box_shown_; | |
| 123 } | |
| 124 | |
| 125 bool PrinterQuery::is_callback_pending() const { | 121 bool PrinterQuery::is_callback_pending() const { |
| 126 return callback_.get() != NULL; | 122 return callback_.get() != NULL; |
| 127 } | 123 } |
| 128 | 124 |
| 129 bool PrinterQuery::is_valid() const { | 125 bool PrinterQuery::is_valid() const { |
| 130 return worker_.get() != NULL; | 126 return worker_.get() != NULL; |
| 131 } | 127 } |
| 132 | 128 |
| 133 } // namespace printing | 129 } // namespace printing |
| OLD | NEW |