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; | 9 const double Manifest::Icon::kDefaultDensity = 1; |
10 const int64_t Manifest::kInvalidOrMissingThemeColor = -1; | 10 // 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 |
| 12 // or not. The simplest way to do this is to simply add one to the maximum |
| 13 // possible 32-bit integer. |
| 14 const int64_t Manifest::kInvalidOrMissingThemeColor = |
| 15 static_cast<int64_t>(std::numeric_limits<int32_t>::max()) + 1; |
11 const size_t Manifest::kMaxIPCStringLength = 4 * 1024; | 16 const size_t Manifest::kMaxIPCStringLength = 4 * 1024; |
12 | 17 |
13 Manifest::Icon::Icon() | 18 Manifest::Icon::Icon() |
14 : density(kDefaultDensity) { | 19 : density(kDefaultDensity) { |
15 } | 20 } |
16 | 21 |
17 Manifest::Icon::~Icon() { | 22 Manifest::Icon::~Icon() { |
18 } | 23 } |
19 | 24 |
20 Manifest::RelatedApplication::RelatedApplication() { | 25 Manifest::RelatedApplication::RelatedApplication() { |
(...skipping 19 matching lines...) Expand all Loading... |
40 display == DISPLAY_MODE_UNSPECIFIED && | 45 display == DISPLAY_MODE_UNSPECIFIED && |
41 orientation == blink::WebScreenOrientationLockDefault && | 46 orientation == blink::WebScreenOrientationLockDefault && |
42 icons.empty() && | 47 icons.empty() && |
43 related_applications.empty() && | 48 related_applications.empty() && |
44 !prefer_related_applications && | 49 !prefer_related_applications && |
45 theme_color == Manifest::kInvalidOrMissingThemeColor && | 50 theme_color == Manifest::kInvalidOrMissingThemeColor && |
46 gcm_sender_id.is_null(); | 51 gcm_sender_id.is_null(); |
47 } | 52 } |
48 | 53 |
49 } // namespace content | 54 } // namespace content |
OLD | NEW |