| 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 "content/public/common/manifest.h" | 5 #include "content/public/common/manifest.h" |
| 6 | 6 |
| 7 namespace content { | 7 namespace content { |
| 8 | 8 |
| 9 const double Manifest::Icon::kDefaultDensity = 1; | |
| 10 // 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 |
| 11 // 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 |
| 12 // 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 |
| 13 // possible 32-bit integer. | 12 // possible 32-bit integer. |
| 14 const int64_t Manifest::kInvalidOrMissingColor = | 13 const int64_t Manifest::kInvalidOrMissingColor = |
| 15 static_cast<int64_t>(std::numeric_limits<int32_t>::max()) + 1; | 14 static_cast<int64_t>(std::numeric_limits<int32_t>::max()) + 1; |
| 16 const size_t Manifest::kMaxIPCStringLength = 4 * 1024; | 15 const size_t Manifest::kMaxIPCStringLength = 4 * 1024; |
| 17 | 16 |
| 18 Manifest::Icon::Icon() | 17 Manifest::Icon::Icon() { } |
| 19 : density(kDefaultDensity) { | |
| 20 } | |
| 21 | 18 |
| 22 Manifest::Icon::Icon(const Icon& other) = default; | 19 Manifest::Icon::Icon(const Icon& other) = default; |
| 23 | 20 |
| 24 Manifest::Icon::~Icon() { | 21 Manifest::Icon::~Icon() { |
| 25 } | 22 } |
| 26 | 23 |
| 27 Manifest::RelatedApplication::RelatedApplication() { | 24 Manifest::RelatedApplication::RelatedApplication() { |
| 28 } | 25 } |
| 29 | 26 |
| 30 Manifest::RelatedApplication::~RelatedApplication() { | 27 Manifest::RelatedApplication::~RelatedApplication() { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 51 orientation == blink::WebScreenOrientationLockDefault && | 48 orientation == blink::WebScreenOrientationLockDefault && |
| 52 icons.empty() && | 49 icons.empty() && |
| 53 related_applications.empty() && | 50 related_applications.empty() && |
| 54 !prefer_related_applications && | 51 !prefer_related_applications && |
| 55 theme_color == Manifest::kInvalidOrMissingColor && | 52 theme_color == Manifest::kInvalidOrMissingColor && |
| 56 background_color == Manifest::kInvalidOrMissingColor && | 53 background_color == Manifest::kInvalidOrMissingColor && |
| 57 gcm_sender_id.is_null(); | 54 gcm_sender_id.is_null(); |
| 58 } | 55 } |
| 59 | 56 |
| 60 } // namespace content | 57 } // namespace content |
| OLD | NEW |