| 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/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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 const content::FrameNavigateParams& /*params*/) { | 412 const content::FrameNavigateParams& /*params*/) { |
| 413 // Cancel any outstanding pin operations once the user navigates away from | 413 // Cancel any outstanding pin operations once the user navigates away from |
| 414 // the page. | 414 // the page. |
| 415 if (favicon_chooser_.get()) | 415 if (favicon_chooser_.get()) |
| 416 favicon_chooser_.reset(); | 416 favicon_chooser_.reset(); |
| 417 // Any candidate favicons we have are now out of date so clear them. | 417 // Any candidate favicons we have are now out of date so clear them. |
| 418 favicon_url_candidates_.clear(); | 418 favicon_url_candidates_.clear(); |
| 419 } | 419 } |
| 420 | 420 |
| 421 void MetroPinTabHelper::DidUpdateFaviconURL( | 421 void MetroPinTabHelper::DidUpdateFaviconURL( |
| 422 int32 page_id, | |
| 423 const std::vector<content::FaviconURL>& candidates) { | 422 const std::vector<content::FaviconURL>& candidates) { |
| 424 favicon_url_candidates_ = candidates; | 423 favicon_url_candidates_ = candidates; |
| 425 } | 424 } |
| 426 | 425 |
| 427 void MetroPinTabHelper::DidDownloadFavicon( | 426 void MetroPinTabHelper::DidDownloadFavicon( |
| 428 int id, | 427 int id, |
| 429 int http_status_code, | 428 int http_status_code, |
| 430 const GURL& image_url, | 429 const GURL& image_url, |
| 431 const std::vector<SkBitmap>& bitmaps, | 430 const std::vector<SkBitmap>& bitmaps, |
| 432 const std::vector<gfx::Size>& original_bitmap_sizes) { | 431 const std::vector<gfx::Size>& original_bitmap_sizes) { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 450 | 449 |
| 451 GURL url = web_contents()->GetURL(); | 450 GURL url = web_contents()->GetURL(); |
| 452 base::string16 tile_id = GenerateTileId(base::UTF8ToUTF16(url.spec())); | 451 base::string16 tile_id = GenerateTileId(base::UTF8ToUTF16(url.spec())); |
| 453 metro_un_pin_from_start_screen(tile_id, | 452 metro_un_pin_from_start_screen(tile_id, |
| 454 base::Bind(&PinPageReportUmaCallback)); | 453 base::Bind(&PinPageReportUmaCallback)); |
| 455 } | 454 } |
| 456 | 455 |
| 457 void MetroPinTabHelper::FaviconDownloaderFinished() { | 456 void MetroPinTabHelper::FaviconDownloaderFinished() { |
| 458 favicon_chooser_.reset(); | 457 favicon_chooser_.reset(); |
| 459 } | 458 } |
| OLD | NEW |