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

Side by Side Diff: components/cloud_devices/common/printer_description.h

Issue 325313003: Add vendor id and custom display name to media selection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address cl comments. Created 6 years, 6 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
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 #ifndef COMPONENTS_CLOUD_DEVICES_COMMON_CLOUD_PRINTER_DESCRIPTION_H_ 5 #ifndef COMPONENTS_CLOUD_DEVICES_COMMON_CLOUD_PRINTER_DESCRIPTION_H_
6 #define COMPONENTS_CLOUD_DEVICES_COMMON_CLOUD_PRINTER_DESCRIPTION_H_ 6 #define COMPONENTS_CLOUD_DEVICES_COMMON_CLOUD_PRINTER_DESCRIPTION_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 }; 285 };
286 286
287 struct Media { 287 struct Media {
288 Media(); 288 Media();
289 289
290 explicit Media(MediaType type); 290 explicit Media(MediaType type);
291 291
292 Media(MediaType type, int32 width_um, int32 height_um); 292 Media(MediaType type, int32 width_um, int32 height_um);
293 293
294 Media(const std::string& custom_display_name, 294 Media(const std::string& custom_display_name,
295 const std::string& vendor_id,
295 int32 width_um, 296 int32 width_um,
296 int32 height_um); 297 int32 height_um);
297 298
298 bool MatchBySize(); 299 bool MatchBySize();
299 300
300 bool IsValid() const; 301 bool IsValid() const;
301 bool operator==(const Media& other) const; 302 bool operator==(const Media& other) const;
302 bool operator!=(const Media& other) const { return !(*this == other); } 303 bool operator!=(const Media& other) const { return !(*this == other); }
303 304
304 MediaType type; 305 MediaType type;
305 int32 width_um; 306 int32 width_um;
306 int32 height_um; 307 int32 height_um;
307 bool is_continuous_feed; 308 bool is_continuous_feed;
308 std::string custom_display_name; 309 std::string custom_display_name;
310 std::string vendor_id;
309 }; 311 };
310 312
311 struct Interval { 313 struct Interval {
312 Interval(); 314 Interval();
313 Interval(int32 start, int32 end); 315 Interval(int32 start, int32 end);
314 Interval(int32 start); 316 Interval(int32 start);
315 317
316 bool operator==(const Interval& other) const; 318 bool operator==(const Interval& other) const;
317 bool operator!=(const Interval& other) const { return !(*this == other); } 319 bool operator!=(const Interval& other) const { return !(*this == other); }
318 320
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 typedef TicketItem<int32, CopiesTraits> CopiesTicketItem; 365 typedef TicketItem<int32, CopiesTraits> CopiesTicketItem;
364 typedef TicketItem<PageRange, PageRangeTraits> PageRangeTicketItem; 366 typedef TicketItem<PageRange, PageRangeTraits> PageRangeTicketItem;
365 typedef TicketItem<bool, CollateTraits> CollateTicketItem; 367 typedef TicketItem<bool, CollateTraits> CollateTicketItem;
366 typedef TicketItem<bool, ReverseTraits> ReverseTicketItem; 368 typedef TicketItem<bool, ReverseTraits> ReverseTicketItem;
367 369
368 } // namespace printer 370 } // namespace printer
369 371
370 } // namespace cloud_devices 372 } // namespace cloud_devices
371 373
372 #endif // COMPONENTS_CLOUD_DEVICES_COMMON_CLOUD_PRINTER_DESCRIPTION_H_ 374 #endif // COMPONENTS_CLOUD_DEVICES_COMMON_CLOUD_PRINTER_DESCRIPTION_H_
OLDNEW
« no previous file with comments | « chrome/common/cloud_print/cloud_print_cdd_conversion.cc ('k') | components/cloud_devices/common/printer_description.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698