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_CONTENT_CONTENT_FAVICON_DRIVER_H_ | 5 #ifndef COMPONENTS_FAVICON_CONTENT_CONTENT_FAVICON_DRIVER_H_ |
6 #define COMPONENTS_FAVICON_CONTENT_CONTENT_FAVICON_DRIVER_H_ | 6 #define COMPONENTS_FAVICON_CONTENT_CONTENT_FAVICON_DRIVER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/optional.h" |
9 #include "components/favicon/core/favicon_driver_impl.h" | 10 #include "components/favicon/core/favicon_driver_impl.h" |
10 #include "content/public/browser/reload_type.h" | 11 #include "content/public/browser/reload_type.h" |
11 #include "content/public/browser/web_contents_observer.h" | 12 #include "content/public/browser/web_contents_observer.h" |
12 #include "content/public/browser/web_contents_user_data.h" | 13 #include "content/public/browser/web_contents_user_data.h" |
13 #include "url/gurl.h" | 14 #include "url/gurl.h" |
14 | 15 |
15 namespace content { | 16 namespace content { |
16 struct FaviconURL; | 17 struct FaviconURL; |
17 class WebContents; | 18 class WebContents; |
18 } | 19 } |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 bookmarks::BookmarkModel* bookmark_model); | 55 bookmarks::BookmarkModel* bookmark_model); |
55 ~ContentFaviconDriver() override; | 56 ~ContentFaviconDriver() override; |
56 | 57 |
57 private: | 58 private: |
58 friend class content::WebContentsUserData<ContentFaviconDriver>; | 59 friend class content::WebContentsUserData<ContentFaviconDriver>; |
59 | 60 |
60 // FaviconHandler::Delegate implementation. | 61 // FaviconHandler::Delegate implementation. |
61 int DownloadImage(const GURL& url, | 62 int DownloadImage(const GURL& url, |
62 int max_image_size, | 63 int max_image_size, |
63 ImageDownloadCallback callback) override; | 64 ImageDownloadCallback callback) override; |
| 65 void DownloadManifest(const GURL& url, |
| 66 ManifestDownloadCallback callback) override; |
64 bool IsOffTheRecord() override; | 67 bool IsOffTheRecord() override; |
65 void OnFaviconUpdated(const GURL& page_url, | 68 void OnFaviconUpdated(const GURL& page_url, |
66 FaviconDriverObserver::NotificationIconType icon_type, | 69 FaviconDriverObserver::NotificationIconType icon_type, |
67 const GURL& icon_url, | 70 const GURL& icon_url, |
68 bool icon_url_changed, | 71 bool icon_url_changed, |
69 const gfx::Image& image) override; | 72 const gfx::Image& image) override; |
70 | 73 |
71 // content::WebContentsObserver implementation. | 74 // content::WebContentsObserver implementation. |
72 void DidUpdateFaviconURL( | 75 void DidUpdateFaviconURL( |
73 const std::vector<content::FaviconURL>& candidates) override; | 76 const std::vector<content::FaviconURL>& candidates) override; |
| 77 // TODO/DONOTSUBMIT(mastiz): Make this 'override'. |
| 78 void DidUpdateManifestURL(const base::Optional<GURL>& manifest_url); |
74 void DidStartNavigation( | 79 void DidStartNavigation( |
75 content::NavigationHandle* navigation_handle) override; | 80 content::NavigationHandle* navigation_handle) override; |
76 void DidFinishNavigation( | 81 void DidFinishNavigation( |
77 content::NavigationHandle* navigation_handle) override; | 82 content::NavigationHandle* navigation_handle) override; |
78 | 83 |
79 GURL bypass_cache_page_url_; | 84 GURL bypass_cache_page_url_; |
80 std::vector<content::FaviconURL> favicon_urls_; | 85 std::vector<content::FaviconURL> favicon_urls_; |
81 | 86 |
82 DISALLOW_COPY_AND_ASSIGN(ContentFaviconDriver); | 87 DISALLOW_COPY_AND_ASSIGN(ContentFaviconDriver); |
83 }; | 88 }; |
84 | 89 |
85 } // namespace favicon | 90 } // namespace favicon |
86 | 91 |
87 #endif // COMPONENTS_FAVICON_CONTENT_CONTENT_FAVICON_DRIVER_H_ | 92 #endif // COMPONENTS_FAVICON_CONTENT_CONTENT_FAVICON_DRIVER_H_ |
OLD | NEW |