| 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/ui/ash/launcher/launcher_favicon_loader.h" | 5 #include "chrome/browser/ui/ash/launcher/launcher_favicon_loader.h" |
| 6 | 6 |
| 7 #include "ash/shelf/shelf_constants.h" | 7 #include "ash/shelf/shelf_constants.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "content/public/browser/render_view_host.h" | 10 #include "content/public/browser/render_view_host.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 weak_ptr_factory_(this) {} | 33 weak_ptr_factory_(this) {} |
| 34 | 34 |
| 35 virtual ~FaviconRawBitmapHandler() {} | 35 virtual ~FaviconRawBitmapHandler() {} |
| 36 | 36 |
| 37 const SkBitmap& bitmap() const { return bitmap_; } | 37 const SkBitmap& bitmap() const { return bitmap_; } |
| 38 | 38 |
| 39 bool HasPendingDownloads() const; | 39 bool HasPendingDownloads() const; |
| 40 | 40 |
| 41 // content::WebContentObserver implementation. | 41 // content::WebContentObserver implementation. |
| 42 virtual void DidUpdateFaviconURL( | 42 virtual void DidUpdateFaviconURL( |
| 43 const std::vector<content::FaviconURL>& candidates) OVERRIDE; | 43 const std::vector<content::FaviconURL>& candidates) override; |
| 44 | 44 |
| 45 private: | 45 private: |
| 46 void DidDownloadFavicon( | 46 void DidDownloadFavicon( |
| 47 int id, | 47 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 void AddFavicon(const GURL& image_url, const SkBitmap& new_bitmap); | 53 void AddFavicon(const GURL& image_url, const SkBitmap& new_bitmap); |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 LauncherFaviconLoader::~LauncherFaviconLoader() { | 168 LauncherFaviconLoader::~LauncherFaviconLoader() { |
| 169 } | 169 } |
| 170 | 170 |
| 171 SkBitmap LauncherFaviconLoader::GetFavicon() const { | 171 SkBitmap LauncherFaviconLoader::GetFavicon() const { |
| 172 return favicon_handler_->bitmap(); | 172 return favicon_handler_->bitmap(); |
| 173 } | 173 } |
| 174 | 174 |
| 175 bool LauncherFaviconLoader::HasPendingDownloads() const { | 175 bool LauncherFaviconLoader::HasPendingDownloads() const { |
| 176 return favicon_handler_->HasPendingDownloads(); | 176 return favicon_handler_->HasPendingDownloads(); |
| 177 } | 177 } |
| OLD | NEW |