| 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 #ifndef CHROME_BROWSER_UI_METRO_PIN_TAB_HELPER_WIN_H_ | 5 #ifndef CHROME_BROWSER_UI_METRO_PIN_TAB_HELPER_WIN_H_ |
| 6 #define CHROME_BROWSER_UI_METRO_PIN_TAB_HELPER_WIN_H_ | 6 #define CHROME_BROWSER_UI_METRO_PIN_TAB_HELPER_WIN_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "content/public/browser/web_contents_observer.h" | 10 #include "content/public/browser/web_contents_observer.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 // The FaviconDownloader class handles downloading the favicons when a page | 36 // The FaviconDownloader class handles downloading the favicons when a page |
| 37 // is being pinned. After it has downloaded any available favicons it will | 37 // is being pinned. After it has downloaded any available favicons it will |
| 38 // continue on with the page pinning action. | 38 // continue on with the page pinning action. |
| 39 class FaviconChooser; | 39 class FaviconChooser; |
| 40 | 40 |
| 41 explicit MetroPinTabHelper(content::WebContents* web_contents); | 41 explicit MetroPinTabHelper(content::WebContents* web_contents); |
| 42 friend class content::WebContentsUserData<MetroPinTabHelper>; | 42 friend class content::WebContentsUserData<MetroPinTabHelper>; |
| 43 | 43 |
| 44 // Favicon download callback. | 44 // Favicon download callback. |
| 45 void DidDownloadFavicon(int id, | 45 void DidDownloadFavicon(int id, |
| 46 int http_status_code, |
| 46 const GURL& image_url, | 47 const GURL& image_url, |
| 47 int requested_size, | 48 int requested_size, |
| 48 const std::vector<SkBitmap>& bitmaps); | 49 const std::vector<SkBitmap>& bitmaps); |
| 49 | 50 |
| 50 void UnPinPageFromStartScreen(); | 51 void UnPinPageFromStartScreen(); |
| 51 | 52 |
| 52 // Called by the |favicon_chooser_| when it has finished. | 53 // Called by the |favicon_chooser_| when it has finished. |
| 53 void FaviconDownloaderFinished(); | 54 void FaviconDownloaderFinished(); |
| 54 | 55 |
| 55 // Candidate Favicon URLs for the current page. | 56 // Candidate Favicon URLs for the current page. |
| 56 std::vector<content::FaviconURL> favicon_url_candidates_; | 57 std::vector<content::FaviconURL> favicon_url_candidates_; |
| 57 | 58 |
| 58 // The currently active FaviconChooser, if there is one. | 59 // The currently active FaviconChooser, if there is one. |
| 59 scoped_ptr<FaviconChooser> favicon_chooser_; | 60 scoped_ptr<FaviconChooser> favicon_chooser_; |
| 60 | 61 |
| 61 | 62 |
| 62 DISALLOW_COPY_AND_ASSIGN(MetroPinTabHelper); | 63 DISALLOW_COPY_AND_ASSIGN(MetroPinTabHelper); |
| 63 }; | 64 }; |
| 64 | 65 |
| 65 #endif // CHROME_BROWSER_UI_METRO_PIN_TAB_HELPER_WIN_H_ | 66 #endif // CHROME_BROWSER_UI_METRO_PIN_TAB_HELPER_WIN_H_ |
| OLD | NEW |