}
// static
+v8::Handle<v8::Value> Window::IsDevToolsOpened(const v8::Arguments& args) {
+ UNWRAP_WINDOW_AND_CHECK;
+ return ToV8Value(self->window_->IsDevToolsOpened());
+}
+
+// static
v8::Handle<v8::Value> Window::InspectElement(const v8::Arguments& args) {
UNWRAP_WINDOW_AND_CHECK;
NODE_SET_PROTOTYPE_METHOD(t, "isKiosk", IsKiosk);
NODE_SET_PROTOTYPE_METHOD(t, "openDevTools", OpenDevTools);
NODE_SET_PROTOTYPE_METHOD(t, "closeDevTools", CloseDevTools);
+ NODE_SET_PROTOTYPE_METHOD(t, "isDevToolsOpened", IsDevToolsOpened);
NODE_SET_PROTOTYPE_METHOD(t, "inspectElement", InspectElement);
NODE_SET_PROTOTYPE_METHOD(t, "focusOnWebView", FocusOnWebView);
NODE_SET_PROTOTYPE_METHOD(t, "blurWebView", BlurWebView);
static v8::Handle<v8::Value> IsKiosk(const v8::Arguments &args);
static v8::Handle<v8::Value> OpenDevTools(const v8::Arguments &args);
static v8::Handle<v8::Value> CloseDevTools(const v8::Arguments &args);
+ static v8::Handle<v8::Value> IsDevToolsOpened(const v8::Arguments &args);
static v8::Handle<v8::Value> InspectElement(const v8::Arguments &args);
static v8::Handle<v8::Value> FocusOnWebView(const v8::Arguments &args);
static v8::Handle<v8::Value> BlurWebView(const v8::Arguments &args);
@setMenu menu if menu?
BrowserWindow::toggleDevTools = ->
- opened = v8Util.getHiddenValue this, 'devtoolsOpened'
- if opened
- @closeDevTools()
- v8Util.setHiddenValue this, 'devtoolsOpened', false
- else
- @openDevTools()
- v8Util.setHiddenValue this, 'devtoolsOpened', true
+ if @isDevToolsOpened() then @closeDevTools() else @openDevTools()
BrowserWindow::restart = ->
@loadUrl(@getUrl())
inspectable_web_contents()->GetView()->CloseDevTools();
}
+bool NativeWindow::IsDevToolsOpened() {
+ return inspectable_web_contents()->IsDevToolsOpened();
+}
+
void NativeWindow::InspectElement(int x, int y) {
OpenDevTools();
content::RenderViewHost* rvh = GetWebContents()->GetRenderViewHost();
virtual bool IsClosed() const { return is_closed_; }
virtual void OpenDevTools();
virtual void CloseDevTools();
+ virtual bool IsDevToolsOpened();
virtual void InspectElement(int x, int y);
virtual void FocusOnWebView();
virtual void BlurWebView();
-Subproject commit b207f0e5bed9c06142879abdd6749ac954eff8b8
+Subproject commit 69d145e64a519f254ae29097905a5599c1d8d48a