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

Side by Side Diff: chrome/browser/ui/metro_pin_tab_helper_win.cc

Issue 12780024: Split FaviconHelper in two: ImageLoadingHelper and FaviconHelper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: caitp feedback Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/metro_pin_tab_helper_win.h" 5 #include "chrome/browser/ui/metro_pin_tab_helper_win.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 return; 393 return;
394 } 394 }
395 395
396 // Request all the candidates. 396 // Request all the candidates.
397 int image_size = 0; // Request the full sized image. 397 int image_size = 0; // Request the full sized image.
398 for (std::vector<content::FaviconURL>::const_iterator iter = 398 for (std::vector<content::FaviconURL>::const_iterator iter =
399 favicon_url_candidates_.begin(); 399 favicon_url_candidates_.begin();
400 iter != favicon_url_candidates_.end(); 400 iter != favicon_url_candidates_.end();
401 ++iter) { 401 ++iter) {
402 favicon_chooser_->AddPendingRequest( 402 favicon_chooser_->AddPendingRequest(
403 web_contents()->DownloadFavicon(iter->icon_url, 403 web_contents()->DownloadImage(iter->icon_url,
404 true, 404 true,
405 image_size, 405 image_size,
406 base::Bind(&MetroPinTabHelper::DidDownloadFavicon, 406 base::Bind(&MetroPinTabHelper::DidDownloadFavicon,
407 base::Unretained(this)))); 407 base::Unretained(this))));
408 } 408 }
409 409
410 } 410 }
411 411
412 void MetroPinTabHelper::DidNavigateMainFrame( 412 void MetroPinTabHelper::DidNavigateMainFrame(
413 const content::LoadCommittedDetails& /*details*/, 413 const content::LoadCommittedDetails& /*details*/,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 451
452 GURL url = web_contents()->GetURL(); 452 GURL url = web_contents()->GetURL();
453 string16 tile_id = GenerateTileId(UTF8ToUTF16(url.spec())); 453 string16 tile_id = GenerateTileId(UTF8ToUTF16(url.spec()));
454 metro_un_pin_from_start_screen(tile_id, 454 metro_un_pin_from_start_screen(tile_id,
455 base::Bind(&PinPageReportUmaCallback)); 455 base::Bind(&PinPageReportUmaCallback));
456 } 456 }
457 457
458 void MetroPinTabHelper::FaviconDownloaderFinished() { 458 void MetroPinTabHelper::FaviconDownloaderFinished() {
459 favicon_chooser_.reset(); 459 favicon_chooser_.reset();
460 } 460 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/extensions/shell_window.cc ('k') | chrome/browser/ui/views/ash/balloon_view_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698