}
// static
+v8::Handle<v8::Value> Window::InspectElement(const v8::Arguments& args) {
+ UNWRAP_WINDOW_AND_CHECK;
+
+ self->window_->InspectElement(args[0]->IntegerValue(),
+ args[1]->IntegerValue());
+
+ return v8::Undefined();
+}
+
+// static
v8::Handle<v8::Value> Window::FocusOnWebView(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, "inspectElement", InspectElement);
NODE_SET_PROTOTYPE_METHOD(t, "focusOnWebView", FocusOnWebView);
NODE_SET_PROTOTYPE_METHOD(t, "blurWebView", BlurWebView);
NODE_SET_PROTOTYPE_METHOD(t,
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> 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);
static v8::Handle<v8::Value> RestartHangMonitorTimeout(
#include "browser/atom_javascript_dialog_manager.h"
#include "browser/media/media_stream_devices_controller.h"
#include "browser/window_list.h"
+#include "content/public/browser/devtools_agent_host.h"
#include "content/public/browser/invalidate_type.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_details.h"
inspectable_web_contents()->GetView()->CloseDevTools();
}
+void NativeWindow::InspectElement(int x, int y) {
+ OpenDevTools();
+ content::RenderViewHost* rvh = GetWebContents()->GetRenderViewHost();
+ scoped_refptr<content::DevToolsAgentHost> agent(
+ content::DevToolsAgentHost::GetOrCreateFor(rvh));
+ agent->InspectElement(x, y);
+}
+
void NativeWindow::FocusOnWebView() {
GetWebContents()->GetRenderViewHost()->Focus();
}
virtual bool IsClosed() const { return is_closed_; }
virtual void OpenDevTools();
virtual void CloseDevTools();
+ virtual void InspectElement(int x, int y);
virtual void FocusOnWebView();
virtual void BlurWebView();
virtual void RestartHangMonitorTimeout();