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_HISTORY_HISTORY_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ |
6 #define CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ | 6 #define CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 // only a single type will be returned in the priority of | 700 // only a single type will be returned in the priority of |
701 // TOUCH_PRECOMPOSED_ICON, TOUCH_ICON, and FAVICON. | 701 // TOUCH_PRECOMPOSED_ICON, TOUCH_ICON, and FAVICON. |
702 CancelableTaskTracker::TaskId GetFaviconsForURL( | 702 CancelableTaskTracker::TaskId GetFaviconsForURL( |
703 const GURL& page_url, | 703 const GURL& page_url, |
704 int icon_types, | 704 int icon_types, |
705 int desired_size_in_dip, | 705 int desired_size_in_dip, |
706 const std::vector<ui::ScaleFactor>& desired_scale_factors, | 706 const std::vector<ui::ScaleFactor>& desired_scale_factors, |
707 const FaviconService::FaviconResultsCallback& callback, | 707 const FaviconService::FaviconResultsCallback& callback, |
708 CancelableTaskTracker* tracker); | 708 CancelableTaskTracker* tracker); |
709 | 709 |
| 710 // Used by FaviconService to find the first icon whose width and height are |
| 711 // greater than or equal to that of |minimum_size_in_pixels|. This searches |
| 712 // for icons by IconType. Each element of |icon_types| is a bitmask of |
| 713 // IconTypes indicating the types to search for. |
| 714 // If the largest icon of first icon types given by |icon_types| is not |
| 715 // larger than |minimum_size_in_pixel|, the next icon types of |
| 716 // |icon_types| will be searched and so on. |
| 717 // If none icon is larger than |minimum_size_in_pixel|, the largest |
| 718 // one of all icon types in |icon_types| is returned. |
| 719 // This feature is especially useful when some types of icon is perfered as |
| 720 // long as its size is larger than a specific value. |
| 721 CancelableTaskTracker::TaskId GetLargestFaviconForURL( |
| 722 const GURL& page_url, |
| 723 const std::vector<int>& icon_types, |
| 724 int minimum_size_in_pixels, |
| 725 const FaviconService::FaviconResultsCallback& callback, |
| 726 CancelableTaskTracker* tracker); |
| 727 |
710 // Used by the FaviconService to get the favicon bitmap which most closely | 728 // Used by the FaviconService to get the favicon bitmap which most closely |
711 // matches |desired_size_in_dip| and |desired_scale_factor| from the favicon | 729 // matches |desired_size_in_dip| and |desired_scale_factor| from the favicon |
712 // with |favicon_id| from the history backend. If |desired_size_in_dip| is 0, | 730 // with |favicon_id| from the history backend. If |desired_size_in_dip| is 0, |
713 // the largest favicon bitmap for |favicon_id| is returned. | 731 // the largest favicon bitmap for |favicon_id| is returned. |
714 CancelableTaskTracker::TaskId GetFaviconForID( | 732 CancelableTaskTracker::TaskId GetFaviconForID( |
715 chrome::FaviconID favicon_id, | 733 chrome::FaviconID favicon_id, |
716 int desired_size_in_dip, | 734 int desired_size_in_dip, |
717 ui::ScaleFactor desired_scale_factor, | 735 ui::ScaleFactor desired_scale_factor, |
718 const FaviconService::FaviconResultsCallback& callback, | 736 const FaviconService::FaviconResultsCallback& callback, |
719 CancelableTaskTracker* tracker); | 737 CancelableTaskTracker* tracker); |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1063 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; | 1081 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; |
1064 | 1082 |
1065 ObserverList<history::VisitDatabaseObserver> visit_database_observers_; | 1083 ObserverList<history::VisitDatabaseObserver> visit_database_observers_; |
1066 | 1084 |
1067 history::DeleteDirectiveHandler delete_directive_handler_; | 1085 history::DeleteDirectiveHandler delete_directive_handler_; |
1068 | 1086 |
1069 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 1087 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
1070 }; | 1088 }; |
1071 | 1089 |
1072 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ | 1090 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ |
OLD | NEW |