OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/extension.h" | 5 #include "extensions/common/extension.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 } | 425 } |
426 | 426 |
427 bool Extension::is_shared_module() const { | 427 bool Extension::is_shared_module() const { |
428 return manifest()->is_shared_module(); | 428 return manifest()->is_shared_module(); |
429 } | 429 } |
430 | 430 |
431 bool Extension::is_theme() const { | 431 bool Extension::is_theme() const { |
432 return manifest()->is_theme(); | 432 return manifest()->is_theme(); |
433 } | 433 } |
434 | 434 |
| 435 // This is a short-term solution to grant camera and/or microphone access to |
| 436 // extensions: |
| 437 // 1. Virtual keyboard extension. |
| 438 // 2. Flutter gesture recognition extension. |
| 439 // 3. TODO(smus): Airbender experiment 1. |
| 440 // 4. TODO(smus): Airbender experiment 2. |
| 441 // 5. Hotwording component extension. |
| 442 // 6. XKB input method component extension. |
| 443 // 7. M17n/T13n/CJK input method component extension. |
| 444 // Once http://crbug.com/292856 is fixed, remove this whitelist. |
| 445 bool Extension::is_media_request_white_listed() const { |
| 446 return id() == "mppnpdlheglhdfmldimlhpnegondlapf" || |
| 447 id() == "jokbpnebhdcladagohdnfgjcpejggllo" || |
| 448 id() == "clffjmdilanldobdnedchkdbofoimcgb" || |
| 449 id() == "nnckehldicaciogcbchegobnafnjkcne" || |
| 450 id() == "nbpagnldghgfoolbancepceaanlmhfmd" || |
| 451 id() == "jkghodnilhceideoidjikpgommlajknk" || |
| 452 id() == "gjaehgfemfahhmlgpdfknkhdnemmolop"; |
| 453 } |
| 454 |
435 bool Extension::can_be_incognito_enabled() const { | 455 bool Extension::can_be_incognito_enabled() const { |
436 // Only component platform apps are supported in incognito. | 456 // Only component platform apps are supported in incognito. |
437 return !is_platform_app() || location() == Manifest::COMPONENT; | 457 return !is_platform_app() || location() == Manifest::COMPONENT; |
438 } | 458 } |
439 | 459 |
440 void Extension::AddWebExtentPattern(const URLPattern& pattern) { | 460 void Extension::AddWebExtentPattern(const URLPattern& pattern) { |
441 // Bookmark apps are permissionless. | 461 // Bookmark apps are permissionless. |
442 if (from_bookmark()) | 462 if (from_bookmark()) |
443 return; | 463 return; |
444 | 464 |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
779 | 799 |
780 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( | 800 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( |
781 const Extension* extension, | 801 const Extension* extension, |
782 const PermissionSet* permissions, | 802 const PermissionSet* permissions, |
783 Reason reason) | 803 Reason reason) |
784 : reason(reason), | 804 : reason(reason), |
785 extension(extension), | 805 extension(extension), |
786 permissions(permissions) {} | 806 permissions(permissions) {} |
787 | 807 |
788 } // namespace extensions | 808 } // namespace extensions |
OLD | NEW |