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

Side by Side Diff: extensions/common/features/simple_feature.cc

Issue 2892403002: Introduce lock screen app context to extension features (Closed)
Patch Set: . Created 3 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 "extensions/common/features/simple_feature.h" 5 #include "extensions/common/features/simple_feature.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 case Feature::CONTENT_SCRIPT_CONTEXT: 97 case Feature::CONTENT_SCRIPT_CONTEXT:
98 return "content script"; 98 return "content script";
99 case Feature::WEB_PAGE_CONTEXT: 99 case Feature::WEB_PAGE_CONTEXT:
100 return "web page"; 100 return "web page";
101 case Feature::BLESSED_WEB_PAGE_CONTEXT: 101 case Feature::BLESSED_WEB_PAGE_CONTEXT:
102 return "hosted app"; 102 return "hosted app";
103 case Feature::WEBUI_CONTEXT: 103 case Feature::WEBUI_CONTEXT:
104 return "webui"; 104 return "webui";
105 case Feature::SERVICE_WORKER_CONTEXT: 105 case Feature::SERVICE_WORKER_CONTEXT:
106 return "service worker"; 106 return "service worker";
107 case Feature::LOCK_SCREEN_EXTENSION_CONTEXT:
108 return "lock screen app";
107 } 109 }
108 NOTREACHED(); 110 NOTREACHED();
109 return ""; 111 return "";
110 } 112 }
111 113
112 std::string GetDisplayName(version_info::Channel channel) { 114 std::string GetDisplayName(version_info::Channel channel) {
113 switch (channel) { 115 switch (channel) {
114 case version_info::Channel::UNKNOWN: 116 case version_info::Channel::UNKNOWN:
115 return "trunk"; 117 return "trunk";
116 case version_info::Channel::CANARY: 118 case version_info::Channel::CANARY:
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 // "matches" from say "blessed_extension" then they can use complex features. 609 // "matches" from say "blessed_extension" then they can use complex features.
608 if ((context == WEB_PAGE_CONTEXT || context == WEBUI_CONTEXT) && 610 if ((context == WEB_PAGE_CONTEXT || context == WEBUI_CONTEXT) &&
609 !matches_.MatchesURL(url)) { 611 !matches_.MatchesURL(url)) {
610 return CreateAvailability(INVALID_URL, url); 612 return CreateAvailability(INVALID_URL, url);
611 } 613 }
612 614
613 return CreateAvailability(IS_AVAILABLE); 615 return CreateAvailability(IS_AVAILABLE);
614 } 616 }
615 617
616 } // namespace extensions 618 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/features/feature.h ('k') | extensions/common/features/simple_feature_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698