From: gray Date: Sun, 2 Nov 2014 15:20:10 +0000 (-0800) Subject: update and document openDevTools on web view. X-Git-Tag: v0.19.1~4^2~4^2~2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=f43c227806196a5ff8bf312af76b32515fdd1ccd;p=electron.git update and document openDevTools on web view. --- diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index cbe0b5a6..16e31b7f 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -64,7 +64,6 @@ WebContents::WebContents(const mate::Dictionary& options) Observe(storage_.get()); inspectable_web_contents_.reset(brightray::InspectableWebContents::Create(storage_.get())); -// inspectable_web_contents()->SetDelegate(this); } WebContents::~WebContents() { diff --git a/atom/browser/api/atom_api_web_contents.h b/atom/browser/api/atom_api_web_contents.h index 47f8e25f..6b9e0b73 100644 --- a/atom/browser/api/atom_api_web_contents.h +++ b/atom/browser/api/atom_api_web_contents.h @@ -28,15 +28,12 @@ namespace brightray namespace atom { -class AtomJavaScriptDialogManager; - namespace api { class WebContents : public mate::EventEmitter, public content::BrowserPluginGuestDelegate, public content::WebContentsDelegate, public content::WebContentsObserver { - // public brightray::InspectableWebContentsDelegate { public: // Create from an existing WebContents. static mate::Handle CreateFrom( @@ -101,13 +98,6 @@ class WebContents : public mate::EventEmitter, inspectable_web_contents_.get()); } - // Devtools -/* void DevToolsSaveToFile(const std::string& url, - const std::string& content, - bool save_as) override; - void DevToolsAppendToFile(const std::string& url, - const std::string& content) override; */ - // mate::Wrappable: virtual mate::ObjectTemplateBuilder GetObjectTemplateBuilder( v8::Isolate* isolate) override; @@ -205,8 +195,6 @@ class WebContents : public mate::EventEmitter, // The WebContents that attaches this guest view. content::WebContents* embedder_web_contents_; - scoped_ptr dialog_manager_; - // Notice that inspectable_web_contents_ must be placed after dialog_manager_, // so we can make sure inspectable_web_contents_ is destroyed before // dialog_manager_, otherwise a crash would happen. diff --git a/docs/api/web-view-tag.md b/docs/api/web-view-tag.md index 10bc067d..55c524b0 100644 --- a/docs/api/web-view-tag.md +++ b/docs/api/web-view-tag.md @@ -169,6 +169,10 @@ Injects CSS into guest page. Evaluate `code` in guest page. +### ``.openDevTools() + +Open a devtools instance for the webview's contents. + ### ``.send(channel[, args...]) * `channel` String