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

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

Issue 1728033002: components: Add out-of-line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 "components/cloud_devices/common/printer_description.h" 5 #include "components/cloud_devices/common/printer_description.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 const std::string& vendor_id, 464 const std::string& vendor_id,
465 int32_t width_um, 465 int32_t width_um,
466 int32_t height_um) 466 int32_t height_um)
467 : type(CUSTOM_MEDIA), 467 : type(CUSTOM_MEDIA),
468 width_um(width_um), 468 width_um(width_um),
469 height_um(height_um), 469 height_um(height_um),
470 is_continuous_feed(width_um <= 0 || height_um <= 0), 470 is_continuous_feed(width_um <= 0 || height_um <= 0),
471 custom_display_name(custom_display_name), 471 custom_display_name(custom_display_name),
472 vendor_id(vendor_id) {} 472 vendor_id(vendor_id) {}
473 473
474 Media::Media(const Media& other) = default;
475
474 bool Media::MatchBySize() { 476 bool Media::MatchBySize() {
475 const MediaDefinition* media = FindMediaBySize(width_um, height_um); 477 const MediaDefinition* media = FindMediaBySize(width_um, height_um);
476 if (!media) 478 if (!media)
477 return false; 479 return false;
478 type = media->id; 480 type = media->id;
479 return true; 481 return true;
480 } 482 }
481 483
482 bool Media::IsValid() const { 484 bool Media::IsValid() const {
483 if (is_continuous_feed) { 485 if (is_continuous_feed) {
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 template class TicketItem<Margins, MarginsTraits>; 832 template class TicketItem<Margins, MarginsTraits>;
831 template class TicketItem<Dpi, DpiTraits>; 833 template class TicketItem<Dpi, DpiTraits>;
832 template class TicketItem<FitToPageType, FitToPageTraits>; 834 template class TicketItem<FitToPageType, FitToPageTraits>;
833 template class TicketItem<Media, MediaTraits>; 835 template class TicketItem<Media, MediaTraits>;
834 template class TicketItem<int32_t, CopiesTraits>; 836 template class TicketItem<int32_t, CopiesTraits>;
835 template class TicketItem<PageRange, PageRangeTraits>; 837 template class TicketItem<PageRange, PageRangeTraits>;
836 template class TicketItem<bool, CollateTraits>; 838 template class TicketItem<bool, CollateTraits>;
837 template class TicketItem<bool, ReverseTraits>; 839 template class TicketItem<bool, ReverseTraits>;
838 840
839 } // namespace cloud_devices 841 } // namespace cloud_devices
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698