]> khamidou — GitHub mirrors - electron.git/commitdiff
update and document openDevTools on web view.
authorgray <gray@webpushers.com>
Sun, 2 Nov 2014 15:20:10 +0000 (07:20 -0800)
committergray <gray@webpushers.com>
Sun, 2 Nov 2014 15:20:10 +0000 (07:20 -0800)
atom/browser/api/atom_api_web_contents.cc
atom/browser/api/atom_api_web_contents.h
docs/api/web-view-tag.md

index cbe0b5a640278e45c74873b9761a977a74dc24a6..16e31b7fe90e437e54aac0b5e3535207995abe4d 100644 (file)
@@ -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() {
index 47f8e25f558708cd529183e5c4b0de8d56f025a7..6b9e0b736c596f39196335a0f1fc7c4d211dbb0f 100644 (file)
@@ -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<WebContents> 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<AtomJavaScriptDialogManager> 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.
index 10bc067df4b45f0a8adb7a38f41b1f7dd5eee227..55c524b0d9e4621a9686ba9c421238c79a087e6f 100644 (file)
@@ -169,6 +169,10 @@ Injects CSS into guest page.
 
 Evaluate `code` in guest page.
 
+### `<webview>`.openDevTools()
+
+Open a devtools instance for the webview's contents.
+
 ### `<webview>`.send(channel[, args...])
 
 * `channel` String