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

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

Issue 2063003003: Implement "scope" Web Manifest parsing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'webapk_manifest_scope00' into webapk_manifest_scope0 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
(...skipping 26 matching lines...) Expand all
37 37
38 Manifest::Manifest(const Manifest& other) = default; 38 Manifest::Manifest(const Manifest& other) = default;
39 39
40 Manifest::~Manifest() { 40 Manifest::~Manifest() {
41 } 41 }
42 42
43 bool Manifest::IsEmpty() const { 43 bool Manifest::IsEmpty() const {
44 return name.is_null() && 44 return name.is_null() &&
45 short_name.is_null() && 45 short_name.is_null() &&
46 start_url.is_empty() && 46 start_url.is_empty() &&
47 scope.is_empty() &&
mlamouri (slow - plz ping) 2016/06/21 13:48:54 ditto
47 display == blink::WebDisplayModeUndefined && 48 display == blink::WebDisplayModeUndefined &&
48 orientation == blink::WebScreenOrientationLockDefault && 49 orientation == blink::WebScreenOrientationLockDefault &&
49 icons.empty() && 50 icons.empty() &&
50 related_applications.empty() && 51 related_applications.empty() &&
51 !prefer_related_applications && 52 !prefer_related_applications &&
52 theme_color == Manifest::kInvalidOrMissingColor && 53 theme_color == Manifest::kInvalidOrMissingColor &&
53 background_color == Manifest::kInvalidOrMissingColor && 54 background_color == Manifest::kInvalidOrMissingColor &&
54 gcm_sender_id.is_null(); 55 gcm_sender_id.is_null();
55 } 56 }
56 57
57 } // namespace content 58 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698