update and document openDevTools on web view.

This commit is contained in:
gray 2014-11-02 07:20:10 -08:00
parent 368d23ef5b
commit f43c227806
3 changed files with 4 additions and 13 deletions

View 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() {

View 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.

View 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