| 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 "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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |