The main window use ico from favicon.ico

Think CEF could benefit from a new feature or capability? Discuss CEF feature requests here.

The main window use ico from favicon.ico

Postby chenon » Thu Apr 07, 2011 1:11 am

Hi,
Is it possible to specify the icon of window from the HTML link tag?
<link rel="Shortcut Icon" href="favicon.ico">

Thanks a lot!
chenon
Newbie
 
Posts: 3
Joined: Mon Sep 27, 2010 5:21 am

Re: The main window use ico from favicon.ico

Postby magreenblatt » Thu Apr 07, 2011 11:11 am

There are three separate issues here.

1. Expose favicon change notifications from CEF. This can be done in browser_webview_delegate.[h|cc] by overriding WebFrameClient::didChangeIcons(WebFrame*) and retrieving the icon URL via WebFrame::favIconURL(). Patches to add this functionality welcome.

2. Retrieve the icon once you know the URL. This could be done client-side using the existing CefWebURLRequest interface.

3. Change the client application icon. This would depend on how your client application is written and is beyond the scope of this forum (I would suggest googling it).

Regards,
Marshall
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: The main window use ico from favicon.ico

Postby TalkiToaster » Sat Apr 27, 2013 4:53 am

Would the process of adding favicon support to CEF 3 still be the same as described above?
TalkiToaster
Newbie
 
Posts: 6
Joined: Sun Mar 24, 2013 11:40 am

Re: The main window use ico from favicon.ico

Postby magreenblatt » Sat Apr 27, 2013 10:24 am

TalkiToaster wrote:Would the process of adding favicon support to CEF 3 still be the same as described above?

It is already done, see http://code.google.com/p/chromiumembedd ... ail?id=779
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: The main window use ico from favicon.ico

Postby TalkiToaster » Sat Apr 27, 2013 2:05 pm

The patch file attached to the bug suggests I should see an OnUpdateFaveiconURL function inside CefDisplayHandler (just below OnTitleChange), however I see no such function in CEF 3.
TalkiToaster
Newbie
 
Posts: 6
Joined: Sun Mar 24, 2013 11:40 am

Re: The main window use ico from favicon.ico

Postby magreenblatt » Sat Apr 27, 2013 3:29 pm

My mistake, it was added in CEF1 and not CEF3. The CEF3 implementatin will be similar but you need to identify the Content API callback.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: The main window use ico from favicon.ico

Postby TalkiToaster » Sun Apr 28, 2013 10:24 am

I'm not at all familiar with the Chrome Content API. That said, I've had a quick look, and a couple of things look like they have potential:
Code: Select all
// Invoked when new FaviconURL candidates are received from the renderer
void WebContentsObserver::DidUpdateFaviconURL

// The favicon data and tracking information. See content::FaviconStatus
const FaviconStatus& NavigationEntry::GetFavicon

Aside from some functions to get the default favicon, these are the only functions that seem to deal with favicons within the public section of the Content API.
TalkiToaster
Newbie
 
Posts: 6
Joined: Sun Mar 24, 2013 11:40 am

Re: The main window use ico from favicon.ico

Postby TalkiToaster » Thu May 02, 2013 1:17 pm

Should I open a new bug for this for CEF 3?
TalkiToaster
Newbie
 
Posts: 6
Joined: Sun Mar 24, 2013 11:40 am

Re: The main window use ico from favicon.ico

Postby magreenblatt » Thu May 02, 2013 1:30 pm

TalkiToaster wrote:Should I open a new bug for this for CEF 3?

Yes please.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: The main window use ico from favicon.ico

Postby TalkiToaster » Thu May 02, 2013 1:41 pm

TalkiToaster
Newbie
 
Posts: 6
Joined: Sun Mar 24, 2013 11:40 am


Return to Feature Request Forum

Who is online

Users browsing this forum: No registered users and 46 guests