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

Side by Side Diff: chrome/browser/media/tab_desktop_media_list.cc

Issue 1913373002: Revert "Refactor ProfileInfoCache in most of c/b/profiles" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/media/tab_desktop_media_list.h" 5 #include "chrome/browser/media/tab_desktop_media_list.h"
6 6
7 #include "base/hash.h" 7 #include "base/hash.h"
8 #include "base/threading/sequenced_worker_pool.h" 8 #include "base/threading/sequenced_worker_pool.h"
9 #include "chrome/browser/profiles/profile_manager.h" 9 #include "chrome/browser/profiles/profile_manager.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
11 #include "chrome/browser/ui/browser_list.h" 11 #include "chrome/browser/ui/browser_list.h"
12 #include "chrome/browser/ui/tabs/tab_strip_model.h" 12 #include "chrome/browser/ui/tabs/tab_strip_model.h"
13 #include "chrome/grit/generated_resources.h" 13 #include "chrome/grit/generated_resources.h"
14 #include "components/favicon/content/content_favicon_driver.h" 14 #include "components/favicon/content/content_favicon_driver.h"
15 #include "content/public/browser/browser_thread.h" 15 #include "content/public/browser/browser_thread.h"
16 #include "content/public/browser/render_frame_host.h" 16 #include "content/public/browser/render_frame_host.h"
17 #include "content/public/browser/render_process_host.h" 17 #include "content/public/browser/render_process_host.h"
18 #include "media/base/video_util.h" 18 #include "media/base/video_util.h"
19 #include "third_party/skia/include/core/SkCanvas.h" 19 #include "third_party/skia/include/core/SkCanvas.h"
20 #include "third_party/skia/include/core/SkImage.h" 20 #include "third_party/skia/include/core/SkImage.h"
21 #include "ui/base/l10n/l10n_util.h" 21 #include "ui/base/l10n/l10n_util.h"
22 #include "ui/gfx/image/image.h"
23 22
24 using content::BrowserThread; 23 using content::BrowserThread;
25 using content::DesktopMediaID; 24 using content::DesktopMediaID;
26 25
27 namespace { 26 namespace {
28 27
29 gfx::ImageSkia CreateEnclosedFaviconImage(gfx::Size size, 28 gfx::ImageSkia CreateEnclosedFaviconImage(gfx::Size size,
30 const gfx::ImageSkia& favicon) { 29 const gfx::ImageSkia& favicon) {
31 DCHECK_GE(size.width(), 20); 30 DCHECK_GE(size.width(), 20);
32 DCHECK_GE(size.height(), 20); 31 DCHECK_GE(size.height(), 20);
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 169
171 // ScheduleNextRefresh() needs to be called after all calls for 170 // ScheduleNextRefresh() needs to be called after all calls for
172 // UpdateSourceThumbnail() have done. Therefore, a DoNothing task is posted 171 // UpdateSourceThumbnail() have done. Therefore, a DoNothing task is posted
173 // to the same sequenced task runner that CreateEnlargedFaviconImag() 172 // to the same sequenced task runner that CreateEnlargedFaviconImag()
174 // is posted. 173 // is posted.
175 thumbnail_task_runner_.get()->PostTaskAndReply( 174 thumbnail_task_runner_.get()->PostTaskAndReply(
176 FROM_HERE, base::Bind(&base::DoNothing), 175 FROM_HERE, base::Bind(&base::DoNothing),
177 base::Bind(&TabDesktopMediaList::ScheduleNextRefresh, 176 base::Bind(&TabDesktopMediaList::ScheduleNextRefresh,
178 weak_factory_.GetWeakPtr())); 177 weak_factory_.GetWeakPtr()));
179 } 178 }
OLDNEW
« no previous file with comments | « chrome/browser/app_controller_mac_browsertest.mm ('k') | chrome/browser/notifications/platform_notification_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698