| 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_FAVICON_FAVICON_DOWNLOAD_HELPER_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_FAVICON_DOWNLOAD_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_FAVICON_FAVICON_DOWNLOAD_HELPER_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_FAVICON_DOWNLOAD_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 | 11 |
| 12 class GURL; | 12 class GURL; |
| 13 class SkBitmap; | 13 class SkBitmap; |
| 14 |
| 15 namespace content { |
| 14 struct FaviconURL; | 16 struct FaviconURL; |
| 17 } |
| 15 | 18 |
| 16 // This class provides a delegate interface for a FaviconDownloadHelper. It | 19 namespace content { |
| 17 // allows the FaviconDownloadHelper to pass favicon data back to its caller. | 20 |
| 18 class FaviconDownloadHelperDelegate { | 21 // This class provides a delegate interface for a Favicon Download requests. It |
| 22 // allows WebContents to pass favicon data back to its caller. |
| 23 class FaviconDownloadDelegate { |
| 19 public: | 24 public: |
| 20 // Called when the icon at |image_url| has been downloaded. | 25 // Called when the icon at |image_url| has been downloaded. |
| 21 // |bitmaps| is a list of all the frames of the icon at |image_url|. | 26 // |bitmaps| is a list of all the frames of the icon at |image_url|. |
| 22 virtual void OnDidDownloadFavicon( | 27 virtual void DidDownloadFavicon( |
| 23 int id, | 28 int id, |
| 24 const GURL& image_url, | 29 const GURL& image_url, |
| 25 bool errored, | 30 bool errored, |
| 26 int requested_size, | 31 int requested_size, |
| 27 const std::vector<SkBitmap>& bitmaps) {} | 32 const std::vector<SkBitmap>& bitmaps) {} |
| 28 | 33 |
| 29 // Message Handler. | 34 // Called when the favicon url of the page is updated. |
| 30 virtual void OnUpdateFaviconURL( | 35 virtual void UpdateFaviconURL( |
| 31 int32 page_id, | 36 int32 page_id, |
| 32 const std::vector<FaviconURL>& candidates) {} | 37 const std::vector<FaviconURL>& candidates) {} |
| 33 | 38 |
| 34 protected: | 39 protected: |
| 35 virtual ~FaviconDownloadHelperDelegate() {} | 40 virtual ~FaviconDownloadDelegate() {} |
| 36 }; | 41 }; |
| 37 | 42 |
| 38 #endif // CHROME_BROWSER_FAVICON_FAVICON_DOWNLOAD_HELPER_DELEGATE_H_ | 43 } // namespace content |
| 44 |
| 45 #endif // CONTENT_PUBLIC_BROWSER_FAVICON_DOWNLOAD_DELEGATE_H_ |
| OLD | NEW |