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 #include "content/public/browser/favicon_status.h" | 5 #include "content/public/browser/favicon_status.h" |
6 | 6 |
7 #include "content/public/browser/content_browser_client.h" | 7 #include "content/public/browser/content_browser_client.h" |
8 #include "ui/gfx/image/image_skia.h" | 8 #include "ui/gfx/image/image_skia.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
11 | 11 |
12 FaviconStatus::FaviconStatus() : valid(false) { | 12 FaviconStatus::FaviconStatus() : valid(false) { |
13 image = gfx::Image(*GetContentClient()->browser()->GetDefaultFavicon()); | 13 image = gfx::Image(*GetContentClient()->browser()->GetDefaultFavicon()); |
14 } | 14 } |
15 | 15 |
16 SkBitmap FaviconStatus::AsBitmap() const { | |
17 return image.IsEmpty() ? SkBitmap() : *image.ToSkBitmap(); | |
18 } | |
19 | |
20 } // namespace content | 16 } // namespace content |
OLD | NEW |