OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/printing/browser/print_manager.h" | 5 #include "components/printing/browser/print_manager.h" |
6 | 6 |
| 7 #include "build/build_config.h" |
7 #include "components/printing/common/print_messages.h" | 8 #include "components/printing/common/print_messages.h" |
8 | 9 |
9 namespace printing { | 10 namespace printing { |
10 | 11 |
11 PrintManager::PrintManager(content::WebContents* contents) | 12 PrintManager::PrintManager(content::WebContents* contents) |
12 : content::WebContentsObserver(contents), | 13 : content::WebContentsObserver(contents), |
13 number_pages_(0), | 14 number_pages_(0), |
14 cookie_(0) { | 15 cookie_(0) { |
15 } | 16 } |
16 | 17 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 #if defined(OS_ANDROID) | 61 #if defined(OS_ANDROID) |
61 void PrintManager::PdfWritingDone(bool result) { | 62 void PrintManager::PdfWritingDone(bool result) { |
62 if (!pdf_writing_done_callback_.is_null()) | 63 if (!pdf_writing_done_callback_.is_null()) |
63 pdf_writing_done_callback_.Run(file_descriptor().fd, result); | 64 pdf_writing_done_callback_.Run(file_descriptor().fd, result); |
64 // Invalidate the file descriptor so it doesn't get reused. | 65 // Invalidate the file descriptor so it doesn't get reused. |
65 file_descriptor_ = base::FileDescriptor(-1, false); | 66 file_descriptor_ = base::FileDescriptor(-1, false); |
66 } | 67 } |
67 #endif | 68 #endif |
68 | 69 |
69 } // namespace printing | 70 } // namespace printing |
OLD | NEW |