| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/common/chrome_content_client.h" | 5 #include "chrome/common/chrome_content_client.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <tuple> | 10 #include <tuple> |
| (...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 } | 673 } |
| 674 | 674 |
| 675 void ChromeContentClient::AddServiceWorkerSchemes( | 675 void ChromeContentClient::AddServiceWorkerSchemes( |
| 676 std::set<std::string>* schemes) { | 676 std::set<std::string>* schemes) { |
| 677 #if defined(ENABLE_EXTENSIONS) | 677 #if defined(ENABLE_EXTENSIONS) |
| 678 if (extensions::feature_util::ExtensionServiceWorkersEnabled()) | 678 if (extensions::feature_util::ExtensionServiceWorkersEnabled()) |
| 679 schemes->insert(extensions::kExtensionScheme); | 679 schemes->insert(extensions::kExtensionScheme); |
| 680 #endif | 680 #endif |
| 681 } | 681 } |
| 682 | 682 |
| 683 bool ChromeContentClient::AllowScriptExtensionForServiceWorker( |
| 684 const GURL& script_url) { |
| 685 #if defined(ENABLE_EXTENSIONS) |
| 686 return script_url.SchemeIs(extensions::kExtensionScheme) || |
| 687 script_url.SchemeIs(extensions::kExtensionResourceScheme); |
| 688 #else |
| 689 return false; |
| 690 #endif |
| 691 } |
| 692 |
| 683 bool ChromeContentClient::IsSupplementarySiteIsolationModeEnabled() { | 693 bool ChromeContentClient::IsSupplementarySiteIsolationModeEnabled() { |
| 684 #if defined(ENABLE_EXTENSIONS) | 694 #if defined(ENABLE_EXTENSIONS) |
| 685 return extensions::IsIsolateExtensionsEnabled(); | 695 return extensions::IsIsolateExtensionsEnabled(); |
| 686 #else | 696 #else |
| 687 return false; | 697 return false; |
| 688 #endif | 698 #endif |
| 689 } | 699 } |
| 690 | 700 |
| 691 base::StringPiece ChromeContentClient::GetOriginTrialPublicKey() { | 701 base::StringPiece ChromeContentClient::GetOriginTrialPublicKey() { |
| 692 return origin_trial_key_manager_.GetPublicKey(); | 702 return origin_trial_key_manager_.GetPublicKey(); |
| 693 } | 703 } |
| 694 | 704 |
| 695 #if defined(OS_ANDROID) | 705 #if defined(OS_ANDROID) |
| 696 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { | 706 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { |
| 697 return new ChromeMediaClientAndroid(); | 707 return new ChromeMediaClientAndroid(); |
| 698 } | 708 } |
| 699 #endif // OS_ANDROID | 709 #endif // OS_ANDROID |
| OLD | NEW |