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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp

Issue 2228873002: Added an origin trial for WebShare. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 (*s_installOriginTrialsFunction)(scriptState); 830 (*s_installOriginTrialsFunction)(scriptState);
831 831
832 // Mark each enabled feature as having been installed. 832 // Mark each enabled feature as having been installed.
833 if (!originTrialContext->featureBindingsInstalled("DurableStorage") && (Runt imeEnabledFeatures::durableStorageEnabled() || originTrialContext->isFeatureEnab led("DurableStorage"))) { 833 if (!originTrialContext->featureBindingsInstalled("DurableStorage") && (Runt imeEnabledFeatures::durableStorageEnabled() || originTrialContext->isFeatureEnab led("DurableStorage"))) {
834 originTrialContext->setFeatureBindingsInstalled("DurableStorage"); 834 originTrialContext->setFeatureBindingsInstalled("DurableStorage");
835 } 835 }
836 836
837 if (!originTrialContext->featureBindingsInstalled("WebBluetooth") && (Runtim eEnabledFeatures::webBluetoothEnabled() || originTrialContext->isFeatureEnabled( "WebBluetooth"))) { 837 if (!originTrialContext->featureBindingsInstalled("WebBluetooth") && (Runtim eEnabledFeatures::webBluetoothEnabled() || originTrialContext->isFeatureEnabled( "WebBluetooth"))) {
838 originTrialContext->setFeatureBindingsInstalled("WebBluetooth"); 838 originTrialContext->setFeatureBindingsInstalled("WebBluetooth");
839 } 839 }
840
841 if (!originTrialContext->featureBindingsInstalled("WebShare") && (RuntimeEna bledFeatures::webBluetoothEnabled() || originTrialContext->isFeatureEnabled("Web Share"))) {
esprehn 2016/08/10 09:35:57 The Bluetooth check here looks like a mistake?
Matt Giuca 2016/08/11 03:08:41 Ahaha yes. (Although it "happens" to work because
842 originTrialContext->setFeatureBindingsInstalled("WebShare");
843 }
840 } 844 }
841 845
842 InstallOriginTrialsFunction setInstallOriginTrialsFunction(InstallOriginTrialsFu nction newInstallOriginTrialsFunction) 846 InstallOriginTrialsFunction setInstallOriginTrialsFunction(InstallOriginTrialsFu nction newInstallOriginTrialsFunction)
843 { 847 {
844 InstallOriginTrialsFunction originalFunction = s_installOriginTrialsFunction ; 848 InstallOriginTrialsFunction originalFunction = s_installOriginTrialsFunction ;
845 s_installOriginTrialsFunction = newInstallOriginTrialsFunction; 849 s_installOriginTrialsFunction = newInstallOriginTrialsFunction;
846 return originalFunction; 850 return originalFunction;
847 } 851 }
848 852
849 void crashIfIsolateIsDead(v8::Isolate* isolate) 853 void crashIfIsolateIsDead(v8::Isolate* isolate)
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u nwrap(data))); 952 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u nwrap(data)));
949 } 953 }
950 954
951 v8::Local<v8::Value> freezeV8Object(v8::Local<v8::Value> value, v8::Isolate* iso late) 955 v8::Local<v8::Value> freezeV8Object(v8::Local<v8::Value> value, v8::Isolate* iso late)
952 { 956 {
953 value.As<v8::Object>()->SetIntegrityLevel(isolate->GetCurrentContext(), v8:: IntegrityLevel::kFrozen).ToChecked(); 957 value.As<v8::Object>()->SetIntegrityLevel(isolate->GetCurrentContext(), v8:: IntegrityLevel::kFrozen).ToChecked();
954 return value; 958 return value;
955 } 959 }
956 960
957 } // namespace blink 961 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698