OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_IMPL_H_ | 5 #ifndef COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_IMPL_H_ |
6 #define COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_IMPL_H_ | 6 #define COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_IMPL_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // Public for testing. | 46 // Public for testing. |
47 void DidDownloadFavicon(int id, | 47 void DidDownloadFavicon(int id, |
48 int http_status_code, | 48 int http_status_code, |
49 const GURL& image_url, | 49 const GURL& image_url, |
50 const std::vector<SkBitmap>& bitmaps, | 50 const std::vector<SkBitmap>& bitmaps, |
51 const std::vector<gfx::Size>& original_bitmap_sizes); | 51 const std::vector<gfx::Size>& original_bitmap_sizes); |
52 | 52 |
53 // FaviconDriver implementation. | 53 // FaviconDriver implementation. |
54 void FetchFavicon(const GURL& url) override; | 54 void FetchFavicon(const GURL& url) override; |
55 bool IsBookmarked(const GURL& url) override; | 55 bool IsBookmarked(const GURL& url) override; |
56 void OnFaviconAvailable(const GURL& page_url, | |
57 const GURL& icon_url, | |
58 const gfx::Image& image, | |
59 bool is_active_favicon) override; | |
60 bool HasPendingTasksForTest() override; | 56 bool HasPendingTasksForTest() override; |
61 | 57 |
62 protected: | 58 protected: |
63 FaviconDriverImpl(FaviconService* favicon_service, | 59 FaviconDriverImpl(FaviconService* favicon_service, |
64 history::HistoryService* history_service, | 60 history::HistoryService* history_service, |
65 bookmarks::BookmarkModel* bookmark_model); | 61 bookmarks::BookmarkModel* bookmark_model); |
66 ~FaviconDriverImpl() override; | 62 ~FaviconDriverImpl() override; |
67 | 63 |
68 // Returns whether downloading favicon for |url| previously failed. | 64 // Returns whether downloading favicon for |url| previously failed. |
69 bool WasUnableToDownloadFavicon(const GURL& url); | 65 bool WasUnableToDownloadFavicon(const GURL& url); |
(...skipping 23 matching lines...) Expand all Loading... |
93 // |touch_icon_handler_| may be null depending on the platform and variations. | 89 // |touch_icon_handler_| may be null depending on the platform and variations. |
94 scoped_ptr<FaviconHandler> favicon_handler_; | 90 scoped_ptr<FaviconHandler> favicon_handler_; |
95 scoped_ptr<FaviconHandler> touch_icon_handler_; | 91 scoped_ptr<FaviconHandler> touch_icon_handler_; |
96 | 92 |
97 DISALLOW_COPY_AND_ASSIGN(FaviconDriverImpl); | 93 DISALLOW_COPY_AND_ASSIGN(FaviconDriverImpl); |
98 }; | 94 }; |
99 | 95 |
100 } // namespace favicon | 96 } // namespace favicon |
101 | 97 |
102 #endif // COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_IMPL_H_ | 98 #endif // COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_IMPL_H_ |
OLD | NEW |