From 81241b38eb5587bfc2045ebb54b62f44b1e9751e Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 9 Sep 2014 10:33:31 +0800 Subject: [PATCH] Add switches of web runtime flags. --- atom/common/options_switches.cc | 18 ++++++++++++++++++ atom/common/options_switches.h | 9 +++++++++ 2 files changed, 27 insertions(+) diff --git a/atom/common/options_switches.cc b/atom/common/options_switches.cc index e322c2230f09..7c23c86416eb 100644 --- a/atom/common/options_switches.cc +++ b/atom/common/options_switches.cc @@ -57,6 +57,24 @@ const char kEnableLargerThanScreen[] = "enable-larger-than-screen"; // Forces to use dark theme on Linux. const char kDarkTheme[] = "dark-theme"; +// Array of availabe web runtime features. +const char kExperimentalFeatures[] = "experimental-features"; +const char kExperimentalCanvasFeatures[] = "experimental-canvas-features"; +const char kSubpixelFontScaling[] = "subpixel-font-scaling"; +const char kOverlayScrollbars[] = "overlay-scrollbars"; +const char kOverlayFullscreenVideo[] = "overlay-fullscreen-video"; +const char kSharedWorker[] = "shared-worker"; + +const int kWebRuntimeFeaturesFlagsSize = 6; +const char* kWebRuntimeFeaturesFlags[kWebRuntimeFeaturesFlagsSize] = { + kExperimentalFeatures, + kExperimentalCanvasFeatures, + kSubpixelFontScaling, + kOverlayScrollbars, + kOverlayFullscreenVideo, + kSharedWorker, +}; + } // namespace switches } // namespace atom diff --git a/atom/common/options_switches.h b/atom/common/options_switches.h index f571e3f431d1..1e504ef161b9 100644 --- a/atom/common/options_switches.h +++ b/atom/common/options_switches.h @@ -36,6 +36,15 @@ extern const char kAutoHideMenuBar[]; extern const char kEnableLargerThanScreen[]; extern const char kDarkTheme[]; +extern const char kExperimentalFeatures[]; +extern const char kExperimentalCanvasFeatures[]; +extern const char kSubpixelFontScaling[]; +extern const char kOverlayScrollbars[]; +extern const char kOverlayFullscreenVideo[]; +extern const char kSharedWorker[]; +extern const int kWebRuntimeFeaturesFlagsSize; +extern const char* kWebRuntimeFeaturesFlags[]; + } // namespace switches } // namespace atom