Expose native implementation of WebContent::GetURL
This commit is contained in:
parent
f140f35910
commit
3bf73bc455
2 changed files with 6 additions and 0 deletions
|
@ -547,6 +547,10 @@ void WebContents::LoadURL(const GURL& url, const mate::Dictionary& options) {
|
||||||
web_contents()->GetController().LoadURLWithParams(params);
|
web_contents()->GetController().LoadURLWithParams(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GURL WebContents::GetURL() const {
|
||||||
|
return web_contents()->GetURL();
|
||||||
|
}
|
||||||
|
|
||||||
base::string16 WebContents::GetTitle() const {
|
base::string16 WebContents::GetTitle() const {
|
||||||
return web_contents()->GetTitle();
|
return web_contents()->GetTitle();
|
||||||
}
|
}
|
||||||
|
@ -815,6 +819,7 @@ mate::ObjectTemplateBuilder WebContents::GetObjectTemplateBuilder(
|
||||||
.SetMethod("getId", &WebContents::GetID)
|
.SetMethod("getId", &WebContents::GetID)
|
||||||
.SetMethod("equal", &WebContents::Equal)
|
.SetMethod("equal", &WebContents::Equal)
|
||||||
.SetMethod("_loadUrl", &WebContents::LoadURL)
|
.SetMethod("_loadUrl", &WebContents::LoadURL)
|
||||||
|
.SetMethod("_getUrl", &WebContents::GetURL)
|
||||||
.SetMethod("getTitle", &WebContents::GetTitle)
|
.SetMethod("getTitle", &WebContents::GetTitle)
|
||||||
.SetMethod("isLoading", &WebContents::IsLoading)
|
.SetMethod("isLoading", &WebContents::IsLoading)
|
||||||
.SetMethod("isWaitingForResponse", &WebContents::IsWaitingForResponse)
|
.SetMethod("isWaitingForResponse", &WebContents::IsWaitingForResponse)
|
||||||
|
|
|
@ -55,6 +55,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
|
||||||
int GetID() const;
|
int GetID() const;
|
||||||
bool Equal(const WebContents* web_contents) const;
|
bool Equal(const WebContents* web_contents) const;
|
||||||
void LoadURL(const GURL& url, const mate::Dictionary& options);
|
void LoadURL(const GURL& url, const mate::Dictionary& options);
|
||||||
|
GURL GetURL() const;
|
||||||
base::string16 GetTitle() const;
|
base::string16 GetTitle() const;
|
||||||
bool IsLoading() const;
|
bool IsLoading() const;
|
||||||
bool IsWaitingForResponse() const;
|
bool IsWaitingForResponse() const;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue