OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_FAVICON_DELEGATE_H__ |
| 6 #define CHROME_BROWSER_FAVICON_DELEGATE_H__ |
| 7 #pragma once |
| 8 |
| 9 #include "chrome/browser/icon_delegate.h" |
| 10 |
| 11 class TabContents; |
| 12 |
| 13 class FaviconDelegate : public IconDelegate { |
| 14 public: |
| 15 explicit FaviconDelegate(TabContents* tab_contents); |
| 16 virtual ~FaviconDelegate(); |
| 17 |
| 18 virtual void UpdateFaviconImageData(NavigationEntry* entry, |
| 19 const GURL& url, |
| 20 scoped_refptr<RefCountedMemory> data); |
| 21 |
| 22 virtual void UpdateFaviconImageData(NavigationEntry* entry, |
| 23 scoped_refptr<RefCountedMemory> data); |
| 24 |
| 25 virtual void UpdateFaviconImageData(NavigationEntry* entry, |
| 26 const SkBitmap& image); |
| 27 |
| 28 virtual void UpdateFaviconURL(NavigationEntry* entry, const GURL& url); |
| 29 |
| 30 // Scales the image such that either the width and/or height is 16 pixels |
| 31 // wide. Does nothing if the image is empty. |
| 32 virtual SkBitmap ConvertToFaviconSize(const SkBitmap& image) = 0; |
| 33 |
| 34 virtual int GetIconSize(); |
| 35 |
| 36 private: |
| 37 TabContents* tab_contents_; |
| 38 }; |
| 39 |
| 40 #endif // CHROME_BROWSER_FAVICON_DELEGATE_H__ |
OLD | NEW |