Chromium Code Reviews| 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 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 684 // FAVICON. | 684 // FAVICON. |
| 685 CancelableTaskTracker::TaskId GetFavicons( | 685 CancelableTaskTracker::TaskId GetFavicons( |
| 686 const std::vector<GURL>& icon_urls, | 686 const std::vector<GURL>& icon_urls, |
| 687 int icon_types, | 687 int icon_types, |
| 688 int desired_size_in_dip, | 688 int desired_size_in_dip, |
| 689 const std::vector<ui::ScaleFactor>& desired_scale_factors, | 689 const std::vector<ui::ScaleFactor>& desired_scale_factors, |
| 690 const FaviconService::FaviconResultsCallback& callback, | 690 const FaviconService::FaviconResultsCallback& callback, |
| 691 CancelableTaskTracker* tracker); | 691 CancelableTaskTracker* tracker); |
| 692 | 692 |
| 693 // Used by the FaviconService to get favicons mapped to |page_url| for | 693 // Used by the FaviconService to get favicons mapped to |page_url| for |
| 694 // |icon_types| which most closely match |desired_size_in_dip| and | 694 // icon_types in |icon_types_in_priority| which most closely match |
| 695 // |desired_scale_factors|. If |desired_size_in_dip| is 0, the largest favicon | 695 // |desired_size_in_dip| and |desired_scale_factors|. |
| 696 // bitmap for |icon_types| is returned. The returned FaviconBitmapResults will | 696 // If |desired_size_in_dip| is 0, the largest favicon bitmap for |icon_types| |
| 697 // have at most one result for each of |desired_scale_factors|. If a favicon | 697 // is returned. The returned FaviconBitmapResults will have at most one |
| 698 // bitmap is determined to be the best candidate for multiple scale factors | 698 // result for each of |desired_scale_factors|. If a favicon bitmap is |
| 699 // there will be less results. If |icon_types| has several types, results for | 699 // determined to be the best candidate for multiple scale factors there will |
| 700 // only a single type will be returned in the priority of | 700 // be less results. If icon_types has several types, results for only a single |
| 701 // TOUCH_PRECOMPOSED_ICON, TOUCH_ICON, and FAVICON. | 701 // type will be returned in the priority of TOUCH_PRECOMPOSED_ICON, |
| 702 // TOUCH_ICON, and FAVICON. | |
| 703 // If |icon_types_in_priority| has more than one element, there is only one | |
| 704 // icon returned, it is the largest icon which is found according | |
| 705 // |desired_size_in_dip| and |desired_scale_factors|, and is the first icon | |
| 706 // larger than |threshold_for_next_icon_types| in the order of icon_types | |
| 707 // given by |icon_types_priority|. | |
| 708 // if none icon is larger than |threshold_for_next_icon_types|, the largest | |
| 709 // one among all types of icon is returned. | |
| 710 // This feature is especially useful when one type of icon is perfered as | |
| 711 // long as its size is larger than a specific value. | |
| 702 CancelableTaskTracker::TaskId GetFaviconsForURL( | 712 CancelableTaskTracker::TaskId GetFaviconsForURL( |
| 703 const GURL& page_url, | 713 const GURL& page_url, |
| 704 int icon_types, | 714 const std::vector<int>& icon_types_priority, |
|
sky
2013/10/08 23:47:52
Make this take FaviconForURLParams.
michaelbai
2013/10/10 05:51:43
Done.
| |
| 705 int desired_size_in_dip, | 715 int desired_size_in_dip, |
| 706 const std::vector<ui::ScaleFactor>& desired_scale_factors, | 716 const std::vector<ui::ScaleFactor>& desired_scale_factors, |
| 717 int threshold_for_next_icon_types, | |
| 707 const FaviconService::FaviconResultsCallback& callback, | 718 const FaviconService::FaviconResultsCallback& callback, |
| 708 CancelableTaskTracker* tracker); | 719 CancelableTaskTracker* tracker); |
| 709 | 720 |
| 710 // Used by the FaviconService to get the favicon bitmap which most closely | 721 // 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 | 722 // 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, | 723 // with |favicon_id| from the history backend. If |desired_size_in_dip| is 0, |
| 713 // the largest favicon bitmap for |favicon_id| is returned. | 724 // the largest favicon bitmap for |favicon_id| is returned. |
| 714 CancelableTaskTracker::TaskId GetFaviconForID( | 725 CancelableTaskTracker::TaskId GetFaviconForID( |
| 715 chrome::FaviconID favicon_id, | 726 chrome::FaviconID favicon_id, |
| 716 int desired_size_in_dip, | 727 int desired_size_in_dip, |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1063 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; | 1074 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; |
| 1064 | 1075 |
| 1065 ObserverList<history::VisitDatabaseObserver> visit_database_observers_; | 1076 ObserverList<history::VisitDatabaseObserver> visit_database_observers_; |
| 1066 | 1077 |
| 1067 history::DeleteDirectiveHandler delete_directive_handler_; | 1078 history::DeleteDirectiveHandler delete_directive_handler_; |
| 1068 | 1079 |
| 1069 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 1080 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
| 1070 }; | 1081 }; |
| 1071 | 1082 |
| 1072 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ | 1083 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ |
| OLD | NEW |