Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Side by Side Diff: chrome/service/cloud_print/cdd_conversion_win.cc

Issue 163393005: Set orientation capability. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/service/cloud_print/cdd_conversion_win.h" 5 #include "chrome/service/cloud_print/cdd_conversion_win.h"
6 6
7 #include "components/cloud_devices/printer_description.h" 7 #include "components/cloud_devices/printer_description.h"
8 #include "printing/backend/print_backend.h" 8 #include "printing/backend/print_backend.h"
9 #include "printing/backend/win_helper.h" 9 #include "printing/backend/win_helper.h"
10 10
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 } 218 }
219 } 219 }
220 if (!is_default_set && default_dpi.IsValid()) 220 if (!is_default_set && default_dpi.IsValid())
221 dpi.AddDefaultOption(default_dpi, true); 221 dpi.AddDefaultOption(default_dpi, true);
222 if (dpi.IsValid()) { 222 if (dpi.IsValid()) {
223 dpi.SaveTo(&description); 223 dpi.SaveTo(&description);
224 } else { 224 } else {
225 NOTREACHED(); 225 NOTREACHED();
226 } 226 }
227 } 227 }
228
229 OrientationCapability orientation;
230 orientation.AddDefaultOption(PORTRAIT, true);
231 orientation.AddOption(LANDSCAPE);
232 orientation.AddOption(AUTO_ORIENTATION);
233 orientation.SaveTo(&description);
234
228 return description.ToString(); 235 return description.ToString();
229 } 236 }
230 237
231 } // namespace cloud_print 238 } // namespace cloud_print
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698