OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "android_webview/browser/icon_helper.h" | 5 #include "android_webview/browser/icon_helper.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 } | 23 } |
24 | 24 |
25 IconHelper::~IconHelper() { | 25 IconHelper::~IconHelper() { |
26 } | 26 } |
27 | 27 |
28 void IconHelper::SetListener(Listener* listener) { | 28 void IconHelper::SetListener(Listener* listener) { |
29 listener_ = listener; | 29 listener_ = listener; |
30 } | 30 } |
31 | 31 |
32 void IconHelper::DownloadFaviconCallback( | 32 void IconHelper::DownloadFaviconCallback( |
33 int id, const GURL& image_url, int requested_size, | 33 int id, int http_status_code, const GURL& image_url, int requested_size, |
34 const std::vector<SkBitmap>& bitmaps) { | 34 const std::vector<SkBitmap>& bitmaps) { |
35 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 35 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
36 if (bitmaps.size() == 0) { | 36 if (bitmaps.size() == 0) { |
37 return; | 37 return; |
38 } | 38 } |
39 | 39 |
40 // We can protentially have multiple frames of the icon | 40 // We can protentially have multiple frames of the icon |
41 // in different sizes. We need more fine grain API spec | 41 // in different sizes. We need more fine grain API spec |
42 // to let clients pick out the frame they want. | 42 // to let clients pick out the frame they want. |
43 | 43 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 // Silently ignore it. Only trigger a callback on valid icons. | 77 // Silently ignore it. Only trigger a callback on valid icons. |
78 break; | 78 break; |
79 default: | 79 default: |
80 NOTREACHED(); | 80 NOTREACHED(); |
81 break; | 81 break; |
82 } | 82 } |
83 } | 83 } |
84 } | 84 } |
85 | 85 |
86 } // namespace android_webview | 86 } // namespace android_webview |
OLD | NEW |