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

Side by Side Diff: chrome/browser/win/jumplist.cc

Issue 2665623002: Fix Jumplist favicons to have high resolution in HDPI Windows displays (Closed)
Patch Set: Add faviconSize parameter to GetFaviconImageForPageURL() Created 3 years, 10 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/win/jumplist.h" 5 #include "chrome/browser/win/jumplist.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 PostRunUpdate(); 518 PostRunUpdate();
519 return; 519 return;
520 } 520 }
521 521
522 favicon::FaviconService* favicon_service = 522 favicon::FaviconService* favicon_service =
523 FaviconServiceFactory::GetForProfile(profile_, 523 FaviconServiceFactory::GetForProfile(profile_,
524 ServiceAccessType::EXPLICIT_ACCESS); 524 ServiceAccessType::EXPLICIT_ACCESS);
525 task_id_ = favicon_service->GetFaviconImageForPageURL( 525 task_id_ = favicon_service->GetFaviconImageForPageURL(
526 url, 526 url,
527 base::Bind(&JumpList::OnFaviconDataAvailable, base::Unretained(this)), 527 base::Bind(&JumpList::OnFaviconDataAvailable, base::Unretained(this)),
528 &cancelable_task_tracker_); 528 &cancelable_task_tracker_, gfx::kHdpiFaviconSize);
529 } 529 }
530 530
531 void JumpList::OnFaviconDataAvailable( 531 void JumpList::OnFaviconDataAvailable(
532 const favicon_base::FaviconImageResult& image_result) { 532 const favicon_base::FaviconImageResult& image_result) {
533 DCHECK(CalledOnValidThread()); 533 DCHECK(CalledOnValidThread());
534 534
535 // If there is currently a favicon request in progress, it is now outdated, 535 // If there is currently a favicon request in progress, it is now outdated,
536 // as we have received another, so nullify the handle from the old request. 536 // as we have received another, so nullify the handle from the old request.
537 task_id_ = base::CancelableTaskTracker::kBadTaskId; 537 task_id_ = base::CancelableTaskTracker::kBadTaskId;
538 // Lock the list to set icon data and pop the url. 538 // Lock the list to set icon data and pop the url.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 void JumpList::TopSitesLoaded(history::TopSites* top_sites) { 608 void JumpList::TopSitesLoaded(history::TopSites* top_sites) {
609 } 609 }
610 610
611 void JumpList::TopSitesChanged(history::TopSites* top_sites, 611 void JumpList::TopSitesChanged(history::TopSites* top_sites,
612 ChangeReason change_reason) { 612 ChangeReason change_reason) {
613 top_sites->GetMostVisitedURLs( 613 top_sites->GetMostVisitedURLs(
614 base::Bind(&JumpList::OnMostVisitedURLsAvailable, 614 base::Bind(&JumpList::OnMostVisitedURLsAvailable,
615 weak_ptr_factory_.GetWeakPtr()), 615 weak_ptr_factory_.GetWeakPtr()),
616 false); 616 false);
617 } 617 }
OLDNEW
« no previous file with comments | « no previous file | components/favicon/core/favicon_service.h » ('j') | components/favicon/core/favicon_service.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698