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

Side by Side Diff: chrome/browser/ui/extensions/shell_window.cc

Issue 11777009: Remove redundant |errored| member from IconHostMsg_DidDownloadFavicon (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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/extensions/shell_window.h" 5 #include "chrome/browser/ui/extensions/shell_window.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/extensions/extension_process_manager.h" 9 #include "chrome/browser/extensions/extension_process_manager.h"
10 #include "chrome/browser/extensions/extension_system.h" 10 #include "chrome/browser/extensions/extension_system.h"
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 441
442 void ShellWindow::OnImageLoaded(const gfx::Image& image, 442 void ShellWindow::OnImageLoaded(const gfx::Image& image,
443 const std::string& extension_id, 443 const std::string& extension_id,
444 int index) { 444 int index) {
445 UpdateAppIcon(image); 445 UpdateAppIcon(image);
446 app_icon_loader_.reset(); 446 app_icon_loader_.reset();
447 } 447 }
448 448
449 void ShellWindow::DidDownloadFavicon(int id, 449 void ShellWindow::DidDownloadFavicon(int id,
450 const GURL& image_url, 450 const GURL& image_url,
451 bool errored,
452 int requested_size, 451 int requested_size,
453 const std::vector<SkBitmap>& bitmaps) { 452 const std::vector<SkBitmap>& bitmaps) {
454 if (image_url != app_icon_url_ || bitmaps.empty()) 453 if (image_url != app_icon_url_ || bitmaps.empty())
455 return; 454 return;
456 455
457 // Bitmaps are ordered largest to smallest. Choose the smallest bitmap 456 // Bitmaps are ordered largest to smallest. Choose the smallest bitmap
458 // whose height >= the preferred size. 457 // whose height >= the preferred size.
459 int largest_index = 0; 458 int largest_index = 0;
460 for (size_t i = 1; i < bitmaps.size(); ++i) { 459 for (size_t i = 1; i < bitmaps.size(); ++i) {
461 if (bitmaps[i].height() < kPreferredIconSize) 460 if (bitmaps[i].height() < kPreferredIconSize)
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 const extensions::DraggableRegion& region = *iter; 627 const extensions::DraggableRegion& region = *iter;
629 sk_region->op( 628 sk_region->op(
630 region.bounds.x(), 629 region.bounds.x(),
631 region.bounds.y(), 630 region.bounds.y(),
632 region.bounds.right(), 631 region.bounds.right(),
633 region.bounds.bottom(), 632 region.bounds.bottom(),
634 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); 633 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op);
635 } 634 }
636 return sk_region; 635 return sk_region;
637 } 636 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/extensions/shell_window.h ('k') | chrome/browser/ui/metro_pin_tab_helper_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698