| Index: chrome/browser/media/tab_desktop_media_list.cc
|
| diff --git a/chrome/browser/media/tab_desktop_media_list.cc b/chrome/browser/media/tab_desktop_media_list.cc
|
| index 0911d54133b14440dde8b61682a80b37e8858a51..7bb8f7f8d09c6001aee63adf01ac62cec2973b5c 100644
|
| --- a/chrome/browser/media/tab_desktop_media_list.cc
|
| +++ b/chrome/browser/media/tab_desktop_media_list.cc
|
| @@ -21,22 +21,9 @@
|
| #include "ui/base/l10n/l10n_util.h"
|
|
|
| using content::BrowserThread;
|
| -using content::DesktopMediaID;
|
|
|
| namespace {
|
|
|
| -// Returns a hash of a favicon to detect when the favicon of media source has
|
| -// changed.
|
| -uint32_t GetImageHash(const gfx::Image& favicon) {
|
| - SkBitmap bitmap = favicon.AsBitmap();
|
| - bitmap.lockPixels();
|
| - uint32_t value =
|
| - base::Hash(reinterpret_cast<char*>(bitmap.getPixels()), bitmap.getSize());
|
| - bitmap.unlockPixels();
|
| -
|
| - return value;
|
| -}
|
| -
|
| gfx::ImageSkia CreateEnlargedFaviconImage(gfx::Size size,
|
| const gfx::ImageSkia& favicon) {
|
| DCHECK_GE(size.width(), 20);
|
| @@ -147,7 +134,8 @@ void TabDesktopMediaList::Refresh() {
|
| continue;
|
|
|
| // Only new or changed favicon need update.
|
| - new_favicon_hashes[media_id] = GetImageHash(favicon);
|
| + new_favicon_hashes[media_id] =
|
| + DesktopMediaListBase::GetImageHash(favicon);
|
| if (!favicon_hashes_.count(media_id) ||
|
| (favicon_hashes_[media_id] != new_favicon_hashes[media_id])) {
|
| gfx::ImageSkia image = favicon.AsImageSkia();
|
|
|