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 "chrome/browser/favicon/favicon_download_helper.h" | 5 #include "chrome/browser/favicon/favicon_download_helper.h" |
6 | 6 |
7 #include "chrome/browser/favicon/favicon_download_helper_delegate.h" | 7 #include "chrome/browser/favicon/favicon_download_helper_delegate.h" |
8 #include "chrome/browser/favicon/favicon_util.h" | 8 #include "chrome/browser/favicon/favicon_util.h" |
9 #include "chrome/common/icon_messages.h" | 9 #include "chrome/common/icon_messages.h" |
10 #include "content/public/browser/render_view_host.h" | 10 #include "content/public/browser/render_view_host.h" |
11 #include "content/public/browser/web_contents.h" | 11 #include "content/public/browser/web_contents.h" |
12 #include "content/public/browser/web_contents_delegate.h" | 12 #include "content/public/browser/web_contents_delegate.h" |
13 | 13 |
| 14 using content::FaviconURL; |
14 using content::WebContents; | 15 using content::WebContents; |
15 | 16 |
16 FaviconDownloadHelper::FaviconDownloadHelper( | 17 FaviconDownloadHelper::FaviconDownloadHelper( |
17 WebContents* web_contents, | 18 WebContents* web_contents, |
18 FaviconDownloadHelperDelegate* delegate) | 19 FaviconDownloadHelperDelegate* delegate) |
19 : content::WebContentsObserver(web_contents), | 20 : content::WebContentsObserver(web_contents), |
20 delegate_(delegate) { | 21 delegate_(delegate) { |
21 DCHECK(delegate_); | 22 DCHECK(delegate_); |
22 } | 23 } |
23 | 24 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 delegate_->OnDidDownloadFavicon( | 61 delegate_->OnDidDownloadFavicon( |
61 id, image_url, errored, requested_size, bitmaps); | 62 id, image_url, errored, requested_size, bitmaps); |
62 download_ids_.erase(i); | 63 download_ids_.erase(i); |
63 } | 64 } |
64 | 65 |
65 void FaviconDownloadHelper::OnUpdateFaviconURL( | 66 void FaviconDownloadHelper::OnUpdateFaviconURL( |
66 int32 page_id, | 67 int32 page_id, |
67 const std::vector<FaviconURL>& candidates) { | 68 const std::vector<FaviconURL>& candidates) { |
68 delegate_->OnUpdateFaviconURL(page_id, candidates); | 69 delegate_->OnUpdateFaviconURL(page_id, candidates); |
69 } | 70 } |
OLD | NEW |