Rely on content switches for implementing experimental features
This commit is contained in:
parent
16d23bbda5
commit
bd20b3f32a
5 changed files with 7 additions and 45 deletions
|
@ -41,11 +41,6 @@ namespace atom {
|
|||
|
||||
namespace {
|
||||
|
||||
bool IsSwitchEnabled(base::CommandLine* command_line,
|
||||
const char* switch_string) {
|
||||
return command_line->GetSwitchValueASCII(switch_string) == "true";
|
||||
}
|
||||
|
||||
// Helper class to forward the messages to the client.
|
||||
class AtomRenderFrameObserver : public content::RenderFrameObserver {
|
||||
public:
|
||||
|
@ -95,8 +90,6 @@ AtomRendererClient::~AtomRendererClient() {
|
|||
}
|
||||
|
||||
void AtomRendererClient::WebKitInitialized() {
|
||||
EnableWebRuntimeFeatures();
|
||||
|
||||
blink::WebCustomElement::addEmbedderCustomElementName("webview");
|
||||
blink::WebCustomElement::addEmbedderCustomElementName("browserplugin");
|
||||
|
||||
|
@ -210,15 +203,6 @@ content::BrowserPluginDelegate* AtomRendererClient::CreateBrowserPluginDelegate(
|
|||
}
|
||||
}
|
||||
|
||||
void AtomRendererClient::EnableWebRuntimeFeatures() {
|
||||
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
|
||||
|
||||
if (IsSwitchEnabled(command_line, switches::kExperimentalFeatures))
|
||||
blink::WebRuntimeFeatures::enableExperimentalFeatures(true);
|
||||
if (IsSwitchEnabled(command_line, switches::kExperimentalCanvasFeatures))
|
||||
blink::WebRuntimeFeatures::enableExperimentalCanvasFeatures(true);
|
||||
}
|
||||
|
||||
void AtomRendererClient::AddKeySystems(
|
||||
std::vector<media::KeySystemInfo>* key_systems) {
|
||||
AddChromeKeySystems(key_systems);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue