Merge pull request #1554 from deepak1556/favicon_patch
webContents: removing getFavicon api
This commit is contained in:
commit
75e5695317
5 changed files with 0 additions and 24 deletions
|
@ -426,13 +426,6 @@ base::string16 WebContents::GetTitle() const {
|
||||||
return web_contents()->GetTitle();
|
return web_contents()->GetTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Image WebContents::GetFavicon() const {
|
|
||||||
auto entry = web_contents()->GetController().GetLastCommittedEntry();
|
|
||||||
if (!entry)
|
|
||||||
return gfx::Image();
|
|
||||||
return entry->GetFavicon().image;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool WebContents::IsLoading() const {
|
bool WebContents::IsLoading() const {
|
||||||
return web_contents()->IsLoading();
|
return web_contents()->IsLoading();
|
||||||
}
|
}
|
||||||
|
@ -613,7 +606,6 @@ mate::ObjectTemplateBuilder WebContents::GetObjectTemplateBuilder(
|
||||||
.SetMethod("isAlive", &WebContents::IsAlive)
|
.SetMethod("isAlive", &WebContents::IsAlive)
|
||||||
.SetMethod("_loadUrl", &WebContents::LoadURL)
|
.SetMethod("_loadUrl", &WebContents::LoadURL)
|
||||||
.SetMethod("getTitle", &WebContents::GetTitle)
|
.SetMethod("getTitle", &WebContents::GetTitle)
|
||||||
.SetMethod("getFavicon", &WebContents::GetFavicon)
|
|
||||||
.SetMethod("isLoading", &WebContents::IsLoading)
|
.SetMethod("isLoading", &WebContents::IsLoading)
|
||||||
.SetMethod("isWaitingForResponse", &WebContents::IsWaitingForResponse)
|
.SetMethod("isWaitingForResponse", &WebContents::IsWaitingForResponse)
|
||||||
.SetMethod("_stop", &WebContents::Stop)
|
.SetMethod("_stop", &WebContents::Stop)
|
||||||
|
|
|
@ -49,7 +49,6 @@ class WebContents : public mate::EventEmitter,
|
||||||
bool IsAlive() const;
|
bool IsAlive() const;
|
||||||
void LoadURL(const GURL& url, const mate::Dictionary& options);
|
void LoadURL(const GURL& url, const mate::Dictionary& options);
|
||||||
base::string16 GetTitle() const;
|
base::string16 GetTitle() const;
|
||||||
gfx::Image GetFavicon() const;
|
|
||||||
bool IsLoading() const;
|
bool IsLoading() const;
|
||||||
bool IsWaitingForResponse() const;
|
bool IsWaitingForResponse() const;
|
||||||
void Stop();
|
void Stop();
|
||||||
|
|
|
@ -277,13 +277,6 @@ registerWebViewElement = ->
|
||||||
remote.getGuestWebContents(internal.guestInstanceId)[m] args...
|
remote.getGuestWebContents(internal.guestInstanceId)[m] args...
|
||||||
proto[m] = createHandler m for m in methods
|
proto[m] = createHandler m for m in methods
|
||||||
|
|
||||||
# Return dataUrl instead of nativeImage.
|
|
||||||
proto.getFavicon = (args...) ->
|
|
||||||
internal = v8Util.getHiddenValue this, 'internal'
|
|
||||||
return unless internal
|
|
||||||
favicon = remote.getGuestWebContents(internal.guestInstanceId)['getFavicon'] args...
|
|
||||||
favicon.toDataUrl()
|
|
||||||
|
|
||||||
window.WebView = webFrame.registerEmbedderCustomElement 'webview',
|
window.WebView = webFrame.registerEmbedderCustomElement 'webview',
|
||||||
prototype: proto
|
prototype: proto
|
||||||
|
|
||||||
|
|
|
@ -743,10 +743,6 @@ Returns URL of current web page.
|
||||||
|
|
||||||
Returns the title of web page.
|
Returns the title of web page.
|
||||||
|
|
||||||
### WebContents.getFavicon()
|
|
||||||
|
|
||||||
Returns the favicon of web page as [NativeImage](native-image.md).
|
|
||||||
|
|
||||||
### WebContents.isLoading()
|
### WebContents.isLoading()
|
||||||
|
|
||||||
Returns whether web page is still loading resources.
|
Returns whether web page is still loading resources.
|
||||||
|
|
|
@ -130,10 +130,6 @@ Returns URL of guest page.
|
||||||
|
|
||||||
Returns the title of guest page.
|
Returns the title of guest page.
|
||||||
|
|
||||||
### `<webview>`.getFavicon()
|
|
||||||
|
|
||||||
Returns the favicon of guest page as dataUrl.
|
|
||||||
|
|
||||||
### `<webview>`.isLoading()
|
### `<webview>`.isLoading()
|
||||||
|
|
||||||
Returns whether guest page is still loading resources.
|
Returns whether guest page is still loading resources.
|
||||||
|
|
Loading…
Reference in a new issue