Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4605)

Unified Diff: chrome/browser/media/tab_desktop_media_list.cc

Issue 1763753003: Capture chrome browser windows from internal rendering procedure for windows and linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
Sergey Ulanov 2016/03/10 00:46:08 I don't think you need DesktopMediaListBase:: here
GeorgeZ 2016/03/10 21:18:46 Done.
if (!favicon_hashes_.count(media_id) ||
(favicon_hashes_[media_id] != new_favicon_hashes[media_id])) {
gfx::ImageSkia image = favicon.AsImageSkia();

Powered by Google App Engine
This is Rietveld 408576698