Move some APIs from Window to WebContents.

This commit is contained in:
Cheng Zhao 2014-04-24 17:00:41 +08:00
parent 26e93e8798
commit 79babe858d
5 changed files with 67 additions and 52 deletions

View file

@ -8,6 +8,8 @@
#include "atom/browser/api/event_emitter.h"
#include "native_mate/handle.h"
class GURL;
namespace content {
class WebContents;
}
@ -21,6 +23,15 @@ class WebContents : public mate::EventEmitter {
static mate::Handle<WebContents> Create(v8::Isolate* isolate,
content::WebContents* web_contents);
GURL GetURL() const;
string16 GetTitle() const;
bool IsLoading() const;
bool IsWaitingForResponse() const;
void Stop();
int GetRoutingID() const;
int GetProcessID() const;
bool IsCrashed() const;
protected:
explicit WebContents(content::WebContents* web_contents);
virtual ~WebContents();