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

Side by Side Diff: chrome/common/chrome_content_client.cc

Issue 1880933002: Begin to enable extension APIs in Extension Service Worker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync @tott Created 4 years, 7 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
« no previous file with comments | « chrome/common/chrome_content_client.h ('k') | chrome/common/extensions/api/_api_features.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/common/chrome_content_client.h ('k') | chrome/common/extensions/api/_api_features.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698