OLD | NEW |
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_UI_COCOA_TAB_CONTENTS_FAVICON_UTIL_MAC_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_FAVICON_UTIL_MAC_H_ |
6 #define CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_FAVICON_UTIL_MAC_H_ | 6 #define CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_FAVICON_UTIL_MAC_H_ |
7 | 7 |
8 #include "third_party/skia/include/core/SkColor.h" | 8 #include "third_party/skia/include/core/SkColor.h" |
9 | 9 |
10 @class NSImage; | 10 @class NSImage; |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 class WebContents; | 13 class WebContents; |
14 } | 14 } |
15 | 15 |
16 namespace mac { | 16 namespace mac { |
17 | 17 |
18 // Returns an autoreleased favicon for a given WebContents. If |contents| | 18 // Returns an autoreleased favicon for a given WebContents. If |contents| |
19 // is NULL or there's no favicon for the NavigationEntry, this will return the | 19 // is NULL or there's no favicon for the NavigationEntry, this will return the |
20 // default image. The color parameter is only used for the default vector image | 20 // default image. The color parameter is only used for the default vector image |
21 // in Material design. | 21 // in Material design. |
22 NSImage* FaviconForWebContents(content::WebContents* contents, | 22 NSImage* FaviconForWebContents(content::WebContents* contents, |
23 SkColor color = SK_ColorBLACK); | 23 SkColor color = SK_ColorBLACK); |
24 | 24 |
| 25 // Returns true if there's no favicon from the given WebContents. |
| 26 bool ShouldUseDefaultFavicon(content::WebContents* contents); |
| 27 |
| 28 // Returns the NSImage containing the default favicon. |
| 29 NSImage* DefaultFavicon(SkColor color = SK_ColorBLACK); |
| 30 |
25 } // namespace mac | 31 } // namespace mac |
26 | 32 |
27 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_FAVICON_UTIL_MAC_H_ | 33 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_FAVICON_UTIL_MAC_H_ |
OLD | NEW |