Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Side by Side Diff: chrome/browser/favicon/favicon_utils.h

Issue 2321833002: [Mac] Desaturate the Favicon for Network Errors (Closed)
Patch Set: Fix for Views Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/favicon/favicon_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_FAVICON_FAVICON_UTILS_H_ 5 #ifndef CHROME_BROWSER_FAVICON_FAVICON_UTILS_H_
6 #define CHROME_BROWSER_FAVICON_FAVICON_UTILS_H_ 6 #define CHROME_BROWSER_FAVICON_FAVICON_UTILS_H_
7 7
8 #include "components/favicon/content/content_favicon_driver.h" 8 #include "components/favicon/content/content_favicon_driver.h"
9 9
10 namespace content {
11 class WebContents;
12 } // namespace content
13
14 namespace gfx {
15 class Image;
16 } // namespace gfx
17
10 namespace favicon { 18 namespace favicon {
11 19
12 // Creates a ContentFaviconDriver and associates it with |web_contents| if none 20 // Creates a ContentFaviconDriver and associates it with |web_contents| if none
13 // exists yet. 21 // exists yet.
14 // 22 //
15 // This is a helper method for ContentFaviconDriver::CreateForWebContents() that 23 // This is a helper method for ContentFaviconDriver::CreateForWebContents() that
16 // gets KeyedService factories from the Profile linked to web_contents. 24 // gets KeyedService factories from the Profile linked to web_contents.
17 void CreateContentFaviconDriverForWebContents( 25 void CreateContentFaviconDriverForWebContents(
18 content::WebContents* web_contents); 26 content::WebContents* web_contents);
19 27
20 // Returns whether the favicon should be displayed. If this returns false, no 28 // Returns whether the favicon should be displayed. If this returns false, no
21 // space is provided for the favicon, and the favicon is never displayed. 29 // space is provided for the favicon, and the favicon is never displayed.
22 bool ShouldDisplayFavicon(content::WebContents* web_contents); 30 bool ShouldDisplayFavicon(content::WebContents* web_contents);
23 31
32 // Retrieves the favicon from given WebContents. If contents contain a
33 // network error, desaturate the favicon.
34 gfx::Image TabFaviconFromWebContents(content::WebContents* contents);
35
24 } // namespace favicon 36 } // namespace favicon
25 37
26 #endif // CHROME_BROWSER_FAVICON_FAVICON_UTILS_H_ 38 #endif // CHROME_BROWSER_FAVICON_FAVICON_UTILS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/favicon/favicon_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698