use webPreferences to disable devtools
This commit is contained in:
parent
0d7e7be748
commit
1f1180f857
3 changed files with 0 additions and 8 deletions
|
@ -84,10 +84,6 @@ Window::Window(v8::Isolate* isolate, v8::Local<v8::Object> wrapper,
|
||||||
if (options.Get("transparent", &transparent))
|
if (options.Get("transparent", &transparent))
|
||||||
web_preferences.Set("transparent", transparent);
|
web_preferences.Set("transparent", transparent);
|
||||||
|
|
||||||
// Disable WebContents.OpenDevTools() ?
|
|
||||||
if (options.Get(options::kDisableDevTools, &value))
|
|
||||||
web_preferences.Set(options::kDisableDevTools, value);
|
|
||||||
|
|
||||||
// Creates the WebContents used by BrowserWindow.
|
// Creates the WebContents used by BrowserWindow.
|
||||||
auto web_contents = WebContents::Create(isolate, web_preferences);
|
auto web_contents = WebContents::Create(isolate, web_preferences);
|
||||||
web_contents_.Reset(isolate, web_contents.ToV8());
|
web_contents_.Reset(isolate, web_contents.ToV8());
|
||||||
|
|
|
@ -96,9 +96,6 @@ const char kNodeIntegration[] = "nodeIntegration";
|
||||||
// Instancd ID of guest WebContents.
|
// Instancd ID of guest WebContents.
|
||||||
const char kGuestInstanceID[] = "guestInstanceId";
|
const char kGuestInstanceID[] = "guestInstanceId";
|
||||||
|
|
||||||
// Diable openDevTools.
|
|
||||||
const char kDisableDevTools[] = "disableDevTools";
|
|
||||||
|
|
||||||
// Web runtime features.
|
// Web runtime features.
|
||||||
const char kExperimentalFeatures[] = "experimentalFeatures";
|
const char kExperimentalFeatures[] = "experimentalFeatures";
|
||||||
const char kExperimentalCanvasFeatures[] = "experimentalCanvasFeatures";
|
const char kExperimentalCanvasFeatures[] = "experimentalCanvasFeatures";
|
||||||
|
|
|
@ -46,7 +46,6 @@ extern const char kBackgroundColor[];
|
||||||
extern const char kHasShadow[];
|
extern const char kHasShadow[];
|
||||||
extern const char kFocusable[];
|
extern const char kFocusable[];
|
||||||
extern const char kWebPreferences[];
|
extern const char kWebPreferences[];
|
||||||
extern const char kDisableDevTools[];
|
|
||||||
|
|
||||||
// WebPreferences.
|
// WebPreferences.
|
||||||
extern const char kZoomFactor[];
|
extern const char kZoomFactor[];
|
||||||
|
|
Loading…
Reference in a new issue