| 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 COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ | 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ |
| 6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ | 6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 // will be fewer results. If |icon_types| has several types, results for only | 669 // will be fewer results. If |icon_types| has several types, results for only |
| 670 // a single type will be returned in the priority of TOUCH_PRECOMPOSED_ICON, | 670 // a single type will be returned in the priority of TOUCH_PRECOMPOSED_ICON, |
| 671 // TOUCH_ICON, and FAVICON. | 671 // TOUCH_ICON, and FAVICON. |
| 672 base::CancelableTaskTracker::TaskId GetFaviconsForURL( | 672 base::CancelableTaskTracker::TaskId GetFaviconsForURL( |
| 673 const GURL& page_url, | 673 const GURL& page_url, |
| 674 int icon_types, | 674 int icon_types, |
| 675 const std::vector<int>& desired_sizes, | 675 const std::vector<int>& desired_sizes, |
| 676 const favicon_base::FaviconResultsCallback& callback, | 676 const favicon_base::FaviconResultsCallback& callback, |
| 677 base::CancelableTaskTracker* tracker); | 677 base::CancelableTaskTracker* tracker); |
| 678 | 678 |
| 679 // Used by FaviconService to find the first favicon bitmap whose width and | 679 // Used by FaviconService to find the largest bitmap for |page_url|. |
| 680 // height are greater than that of |minimum_size_in_pixels|. This searches | |
| 681 // for icons by IconType. Each element of |icon_types| is a bitmask of | |
| 682 // IconTypes indicating the types to search for. | |
| 683 // If the largest icon of |icon_types[0]| is not larger than | |
| 684 // |minimum_size_in_pixel|, the next icon types of | |
| 685 // |icon_types| will be searched and so on. | |
| 686 // If no icon is larger than |minimum_size_in_pixel|, the largest one of all | |
| 687 // icon types in |icon_types| is returned. | |
| 688 // This feature is especially useful when some types of icon is preferred as | |
| 689 // long as its size is larger than a specific value. | |
| 690 base::CancelableTaskTracker::TaskId GetLargestFaviconForURL( | 680 base::CancelableTaskTracker::TaskId GetLargestFaviconForURL( |
| 691 const GURL& page_url, | 681 const GURL& page_url, |
| 692 const std::vector<int>& icon_types, | |
| 693 int minimum_size_in_pixels, | |
| 694 const favicon_base::FaviconRawBitmapCallback& callback, | 682 const favicon_base::FaviconRawBitmapCallback& callback, |
| 695 base::CancelableTaskTracker* tracker); | 683 base::CancelableTaskTracker* tracker); |
| 696 | 684 |
| 697 // Used by the FaviconService to get the favicon bitmap which most closely | 685 // Used by the FaviconService to get the favicon bitmap which most closely |
| 698 // matches |desired_size| from the favicon with |favicon_id| from the history | 686 // matches |desired_size| from the favicon with |favicon_id| from the history |
| 699 // backend. If |desired_size| is 0, the largest favicon bitmap for | 687 // backend. If |desired_size| is 0, the largest favicon bitmap for |
| 700 // |favicon_id| is returned. | 688 // |favicon_id| is returned. |
| 701 base::CancelableTaskTracker::TaskId GetFaviconForID( | 689 base::CancelableTaskTracker::TaskId GetFaviconForID( |
| 702 favicon_base::FaviconID favicon_id, | 690 favicon_base::FaviconID favicon_id, |
| 703 int desired_size, | 691 int desired_size, |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 | 844 |
| 857 // All vended weak pointers are invalidated in Cleanup(). | 845 // All vended weak pointers are invalidated in Cleanup(). |
| 858 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; | 846 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; |
| 859 | 847 |
| 860 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 848 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
| 861 }; | 849 }; |
| 862 | 850 |
| 863 } // namespace history | 851 } // namespace history |
| 864 | 852 |
| 865 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ | 853 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ |
| OLD | NEW |