OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/common/cloud_print/cloud_print_cdd_conversion.h" | 5 #include "chrome/common/cloud_print/cloud_print_cdd_conversion.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
8 #include "components/cloud_devices/common/printer_description.h" | 10 #include "components/cloud_devices/common/printer_description.h" |
9 #include "printing/backend/print_backend.h" | 11 #include "printing/backend/print_backend.h" |
10 | 12 |
11 namespace cloud_print { | 13 namespace cloud_print { |
12 | 14 |
13 scoped_ptr<base::DictionaryValue> PrinterSemanticCapsAndDefaultsToCdd( | 15 scoped_ptr<base::DictionaryValue> PrinterSemanticCapsAndDefaultsToCdd( |
14 const printing::PrinterSemanticCapsAndDefaults& semantic_info) { | 16 const printing::PrinterSemanticCapsAndDefaults& semantic_info) { |
15 using namespace cloud_devices::printer; | 17 using namespace cloud_devices::printer; |
16 cloud_devices::CloudDeviceDescription description; | 18 cloud_devices::CloudDeviceDescription description; |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 OrientationCapability orientation; | 118 OrientationCapability orientation; |
117 orientation.AddDefaultOption(PORTRAIT, true); | 119 orientation.AddDefaultOption(PORTRAIT, true); |
118 orientation.AddOption(LANDSCAPE); | 120 orientation.AddOption(LANDSCAPE); |
119 orientation.AddOption(AUTO_ORIENTATION); | 121 orientation.AddOption(AUTO_ORIENTATION); |
120 orientation.SaveTo(&description); | 122 orientation.SaveTo(&description); |
121 | 123 |
122 return scoped_ptr<base::DictionaryValue>(description.root().DeepCopy()); | 124 return scoped_ptr<base::DictionaryValue>(description.root().DeepCopy()); |
123 } | 125 } |
124 | 126 |
125 } // namespace cloud_print | 127 } // namespace cloud_print |
OLD | NEW |