Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_view_manager_basic.h" | 5 #include "chrome/browser/printing/print_view_manager_basic.h" |
| 6 | 6 |
| 7 #if defined(OS_ANDROID) | |
| 8 #include "base/file_descriptor_posix.h" | |
| 9 #endif | |
| 10 | |
| 7 DEFINE_WEB_CONTENTS_USER_DATA_KEY(printing::PrintViewManagerBasic); | 11 DEFINE_WEB_CONTENTS_USER_DATA_KEY(printing::PrintViewManagerBasic); |
| 8 | 12 |
| 9 namespace printing { | 13 namespace printing { |
| 10 | 14 |
| 11 PrintViewManagerBasic::PrintViewManagerBasic(content::WebContents* web_contents) | 15 PrintViewManagerBasic::PrintViewManagerBasic(content::WebContents* web_contents) |
| 12 : PrintViewManagerBase(web_contents) { | 16 : PrintViewManagerBase(web_contents), |
| 17 #if defined(OS_ANDROID) | |
| 18 file_descriptor_(-1, false) | |
|
Lei Zhang
2013/08/13 23:26:37
The FileDescriptor() version of the ctor does this
cimamoglu1
2013/08/14 16:10:36
Done.
| |
| 19 #endif | |
| 20 { | |
| 13 } | 21 } |
| 14 | 22 |
| 15 PrintViewManagerBasic::~PrintViewManagerBasic() { | 23 PrintViewManagerBasic::~PrintViewManagerBasic() { |
| 16 } | 24 } |
| 17 | 25 |
| 26 #if defined(OS_ANDROID) | |
| 27 void PrintViewManagerBasic::SetFileDescriptor( | |
| 28 const base::FileDescriptor& file_descriptor) { | |
| 29 file_descriptor_ = file_descriptor; | |
| 30 } | |
| 31 | |
| 32 base::FileDescriptor PrintViewManagerBasic::GetFileDescriptor() { | |
| 33 return file_descriptor_; | |
| 34 } | |
| 35 #endif | |
| 36 | |
| 18 } // namespace printing | 37 } // namespace printing |
| OLD | NEW |