]> khamidou — GitHub mirrors - electron.git/commitdiff
webContents: removing getFavicon api
authordeepak1556 <hop2deep@gmail.com>
Mon, 4 May 2015 08:09:13 +0000 (13:39 +0530)
committerdeepak1556 <hop2deep@gmail.com>
Mon, 4 May 2015 08:09:13 +0000 (13:39 +0530)
atom/browser/api/atom_api_web_contents.cc
atom/browser/api/atom_api_web_contents.h
atom/renderer/lib/web-view/web-view.coffee
docs/api/browser-window.md
docs/api/web-view-tag.md

index f13127c84b357bf0863d6e6c0e038791f4252351..c998deca5e3091b2285d8e92ef3894d22f112dac 100644 (file)
@@ -426,13 +426,6 @@ base::string16 WebContents::GetTitle() const {
   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 {
   return web_contents()->IsLoading();
 }
@@ -613,7 +606,6 @@ mate::ObjectTemplateBuilder WebContents::GetObjectTemplateBuilder(
         .SetMethod("isAlive", &WebContents::IsAlive)
         .SetMethod("_loadUrl", &WebContents::LoadURL)
         .SetMethod("getTitle", &WebContents::GetTitle)
-        .SetMethod("getFavicon", &WebContents::GetFavicon)
         .SetMethod("isLoading", &WebContents::IsLoading)
         .SetMethod("isWaitingForResponse", &WebContents::IsWaitingForResponse)
         .SetMethod("_stop", &WebContents::Stop)
index 1925a96f622919747a11afc3cb23199105015bc6..cc2fd30c832f60491e8f372965da4f11d0693c07 100644 (file)
@@ -49,7 +49,6 @@ class WebContents : public mate::EventEmitter,
   bool IsAlive() const;
   void LoadURL(const GURL& url, const mate::Dictionary& options);
   base::string16 GetTitle() const;
-  gfx::Image GetFavicon() const;
   bool IsLoading() const;
   bool IsWaitingForResponse() const;
   void Stop();
index 8641151eac038cd9ca873afbcf2fdbfe3f3ac892..bf163c0cfb5c7e59302cae0e4bef531eda37002a 100644 (file)
@@ -277,13 +277,6 @@ registerWebViewElement = ->
       remote.getGuestWebContents(internal.guestInstanceId)[m]  args...
   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',
     prototype: proto
 
index 44021cabe9391f1e71a2bfaea80c24d7984c7430..b1023db844e0543ded3269008e093e5913fde636 100644 (file)
@@ -741,10 +741,6 @@ Returns URL of current web page.
 
 Returns the title of web page.
 
-### WebContents.getFavicon()
-
-Returns the favicon of web page as [NativeImage](native-image.md).
-
 ### WebContents.isLoading()
 
 Returns whether web page is still loading resources.
index 697860cfea677f7eb2ce607bf7eb3be727f9fb58..89ae678b3c4679a6bd802d502104b68f85ce6647 100644 (file)
@@ -130,10 +130,6 @@ Returns URL of guest page.
 
 Returns the title of guest page.
 
-### `<webview>`.getFavicon()
-
-Returns the favicon of guest page as dataUrl.
-
 ### `<webview>`.isLoading()
 
 Returns whether guest page is still loading resources.