OLD | NEW |
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/views/create_application_shortcut_view.h" | 5 #include "chrome/browser/ui/views/create_application_shortcut_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 std::max(unprocessed_icons_.back().width, | 469 std::max(unprocessed_icons_.back().width, |
470 unprocessed_icons_.back().height), | 470 unprocessed_icons_.back().height), |
471 base::Bind(&CreateUrlApplicationShortcutView::DidDownloadFavicon, | 471 base::Bind(&CreateUrlApplicationShortcutView::DidDownloadFavicon, |
472 base::Unretained(this))); | 472 base::Unretained(this))); |
473 | 473 |
474 unprocessed_icons_.pop_back(); | 474 unprocessed_icons_.pop_back(); |
475 } | 475 } |
476 | 476 |
477 void CreateUrlApplicationShortcutView::DidDownloadFavicon( | 477 void CreateUrlApplicationShortcutView::DidDownloadFavicon( |
478 int id, | 478 int id, |
| 479 int http_status_code, |
479 const GURL& image_url, | 480 const GURL& image_url, |
480 int requested_size, | 481 int requested_size, |
481 const std::vector<SkBitmap>& bitmaps) { | 482 const std::vector<SkBitmap>& bitmaps) { |
482 if (id != pending_download_id_) | 483 if (id != pending_download_id_) |
483 return; | 484 return; |
484 pending_download_id_ = -1; | 485 pending_download_id_ = -1; |
485 | 486 |
486 SkBitmap image; | 487 SkBitmap image; |
487 | 488 |
488 if (!bitmaps.empty()) { | 489 if (!bitmaps.empty()) { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 CreateChromeApplicationShortcutView::~CreateChromeApplicationShortcutView() {} | 531 CreateChromeApplicationShortcutView::~CreateChromeApplicationShortcutView() {} |
531 | 532 |
532 // Called when the app's ShortcutInfo (with icon) is loaded. | 533 // Called when the app's ShortcutInfo (with icon) is loaded. |
533 void CreateChromeApplicationShortcutView::OnShortcutInfoLoaded( | 534 void CreateChromeApplicationShortcutView::OnShortcutInfoLoaded( |
534 const ShellIntegration::ShortcutInfo& shortcut_info) { | 535 const ShellIntegration::ShortcutInfo& shortcut_info) { |
535 shortcut_info_ = shortcut_info; | 536 shortcut_info_ = shortcut_info; |
536 | 537 |
537 CHECK(app_info_); | 538 CHECK(app_info_); |
538 static_cast<AppInfoView*>(app_info_)->UpdateIcon(shortcut_info_.favicon); | 539 static_cast<AppInfoView*>(app_info_)->UpdateIcon(shortcut_info_.favicon); |
539 } | 540 } |
OLD | NEW |