| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/threading/thread_restrictions.h" | 10 #include "base/threading/thread_restrictions.h" |
| 11 #include "base/values.h" | 11 #include "base/values.h" |
| 12 #include "chrome/browser/printing/print_job_worker.h" | 12 #include "chrome/browser/printing/print_job_worker.h" |
| 13 #include "chrome/browser/printing/printing_ui_web_contents_observer.h" | |
| 14 | 13 |
| 15 namespace printing { | 14 namespace printing { |
| 16 | 15 |
| 17 PrinterQuery::PrinterQuery(int render_process_id, int render_view_id) | 16 PrinterQuery::PrinterQuery(int render_process_id, int render_view_id) |
| 18 : worker_(new PrintJobWorker(render_process_id, render_view_id, this)), | 17 : worker_(new PrintJobWorker(render_process_id, render_view_id, this)), |
| 19 is_print_dialog_box_shown_(false), | 18 is_print_dialog_box_shown_(false), |
| 20 cookie_(PrintSettings::NewCookie()), | 19 cookie_(PrintSettings::NewCookie()), |
| 21 last_status_(PrintingContext::FAILED) { | 20 last_status_(PrintingContext::FAILED) { |
| 22 DCHECK(base::MessageLoopForIO::IsCurrent()); | 21 DCHECK(base::MessageLoopForIO::IsCurrent()); |
| 23 } | 22 } |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 124 |
| 126 bool PrinterQuery::is_callback_pending() const { | 125 bool PrinterQuery::is_callback_pending() const { |
| 127 return !callback_.is_null(); | 126 return !callback_.is_null(); |
| 128 } | 127 } |
| 129 | 128 |
| 130 bool PrinterQuery::is_valid() const { | 129 bool PrinterQuery::is_valid() const { |
| 131 return worker_.get() != NULL; | 130 return worker_.get() != NULL; |
| 132 } | 131 } |
| 133 | 132 |
| 134 } // namespace printing | 133 } // namespace printing |
| OLD | NEW |