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

Side by Side Diff: content/public/common/manifest.cc

Issue 2015433003: Implement MediaMetadata artwork in content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed palmer's comments Created 4 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
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 "content/public/common/manifest.h" 5 #include "content/public/common/manifest.h"
6 6
7 namespace content { 7 namespace content {
8 8
9 // We need to provide a value here which is out of the range of a 32-bit integer 9 // We need to provide a value here which is out of the range of a 32-bit integer
10 // since otherwise we would not be able to check whether a theme color was valid 10 // since otherwise we would not be able to check whether a theme color was valid
11 // or not. The simplest way to do this is to simply add one to the maximum 11 // or not. The simplest way to do this is to simply add one to the maximum
12 // possible 32-bit integer. 12 // possible 32-bit integer.
13 const int64_t Manifest::kInvalidOrMissingColor = 13 const int64_t Manifest::kInvalidOrMissingColor =
14 static_cast<int64_t>(std::numeric_limits<int32_t>::max()) + 1; 14 static_cast<int64_t>(std::numeric_limits<int32_t>::max()) + 1;
15 const size_t Manifest::kMaxIPCStringLength = 4 * 1024; 15 const size_t Manifest::kMaxIPCStringLength = 4 * 1024;
16 16
17 Manifest::Icon::Icon() { } 17 Manifest::Icon::Icon() { }
18 18
19 Manifest::Icon::Icon(const Icon& other) = default; 19 Manifest::Icon::Icon(const Icon& other) = default;
20 20
21 Manifest::Icon::~Icon() { 21 Manifest::Icon::~Icon() {
22 } 22 }
23 23
24 bool Manifest::Icon::operator==(const Manifest::Icon& other) const {
25 return src == other.src && type == other.type && sizes == other.sizes;
26 }
27
24 Manifest::RelatedApplication::RelatedApplication() { 28 Manifest::RelatedApplication::RelatedApplication() {
25 } 29 }
26 30
27 Manifest::RelatedApplication::~RelatedApplication() { 31 Manifest::RelatedApplication::~RelatedApplication() {
28 } 32 }
29 33
30 Manifest::Manifest() 34 Manifest::Manifest()
31 : display(blink::WebDisplayModeUndefined), 35 : display(blink::WebDisplayModeUndefined),
32 orientation(blink::WebScreenOrientationLockDefault), 36 orientation(blink::WebScreenOrientationLockDefault),
33 prefer_related_applications(false), 37 prefer_related_applications(false),
(...skipping 14 matching lines...) Expand all
48 orientation == blink::WebScreenOrientationLockDefault && 52 orientation == blink::WebScreenOrientationLockDefault &&
49 icons.empty() && 53 icons.empty() &&
50 related_applications.empty() && 54 related_applications.empty() &&
51 !prefer_related_applications && 55 !prefer_related_applications &&
52 theme_color == Manifest::kInvalidOrMissingColor && 56 theme_color == Manifest::kInvalidOrMissingColor &&
53 background_color == Manifest::kInvalidOrMissingColor && 57 background_color == Manifest::kInvalidOrMissingColor &&
54 gcm_sender_id.is_null(); 58 gcm_sender_id.is_null();
55 } 59 }
56 60
57 } // namespace content 61 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698