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 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
687 // |minimum_size_in_pixel|, the next icon types of | 687 // |minimum_size_in_pixel|, the next icon types of |
688 // |icon_types| will be searched and so on. | 688 // |icon_types| will be searched and so on. |
689 // If no icon is larger than |minimum_size_in_pixel|, the largest one of all | 689 // If no icon is larger than |minimum_size_in_pixel|, the largest one of all |
690 // icon types in |icon_types| is returned. | 690 // icon types in |icon_types| is returned. |
691 // This feature is especially useful when some types of icon is perfered as | 691 // This feature is especially useful when some types of icon is perfered as |
692 // long as its size is larger than a specific value. | 692 // long as its size is larger than a specific value. |
693 base::CancelableTaskTracker::TaskId GetLargestFaviconForURL( | 693 base::CancelableTaskTracker::TaskId GetLargestFaviconForURL( |
694 const GURL& page_url, | 694 const GURL& page_url, |
695 const std::vector<int>& icon_types, | 695 const std::vector<int>& icon_types, |
696 int minimum_size_in_pixels, | 696 int minimum_size_in_pixels, |
697 const favicon_base::FaviconRawCallback& callback, | 697 const favicon_base::FaviconRawBitmapCallback& callback, |
698 base::CancelableTaskTracker* tracker); | 698 base::CancelableTaskTracker* tracker); |
699 | 699 |
700 // Used by the FaviconService to get the favicon bitmap which most closely | 700 // Used by the FaviconService to get the favicon bitmap which most closely |
701 // matches |desired_size_in_dip| and |desired_scale_factor| from the favicon | 701 // matches |desired_size_in_dip| and |desired_scale_factor| from the favicon |
702 // with |favicon_id| from the history backend. If |desired_size_in_dip| is 0, | 702 // with |favicon_id| from the history backend. If |desired_size_in_dip| is 0, |
703 // the largest favicon bitmap for |favicon_id| is returned. | 703 // the largest favicon bitmap for |favicon_id| is returned. |
704 base::CancelableTaskTracker::TaskId GetFaviconForID( | 704 base::CancelableTaskTracker::TaskId GetFaviconForID( |
705 favicon_base::FaviconID favicon_id, | 705 favicon_base::FaviconID favicon_id, |
706 int desired_size_in_dip, | 706 int desired_size_in_dip, |
707 ui::ScaleFactor desired_scale_factor, | 707 ui::ScaleFactor desired_scale_factor, |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 // backend. | 766 // backend. |
767 // |favicon_bitmap_data| replaces all the favicon bitmaps mapped to | 767 // |favicon_bitmap_data| replaces all the favicon bitmaps mapped to |
768 // |page_url|. | 768 // |page_url|. |
769 // |expired| and |icon_type| fields in FaviconBitmapData are ignored. | 769 // |expired| and |icon_type| fields in FaviconBitmapData are ignored. |
770 // Use MergeFavicon() if |favicon_bitmap_data| is incomplete, and favicon | 770 // Use MergeFavicon() if |favicon_bitmap_data| is incomplete, and favicon |
771 // bitmaps in the database should be preserved if possible. For instance, | 771 // bitmaps in the database should be preserved if possible. For instance, |
772 // favicon bitmaps from sync are 1x only. MergeFavicon() is used to avoid | 772 // favicon bitmaps from sync are 1x only. MergeFavicon() is used to avoid |
773 // deleting the 2x favicon bitmap if it is present in the history backend. | 773 // deleting the 2x favicon bitmap if it is present in the history backend. |
774 // See HistoryBackend::ValidateSetFaviconsParams() for more details on the | 774 // See HistoryBackend::ValidateSetFaviconsParams() for more details on the |
775 // criteria for |favicon_bitmap_data| to be valid. | 775 // criteria for |favicon_bitmap_data| to be valid. |
776 void SetFavicons( | 776 void SetFavicons(const GURL& page_url, |
777 const GURL& page_url, | 777 favicon_base::IconType icon_type, |
778 favicon_base::IconType icon_type, | 778 const std::vector<favicon_base::FaviconRawBitmapData>& |
779 const std::vector<favicon_base::FaviconBitmapData>& favicon_bitmap_data); | 779 favicon_bitmap_data); |
780 | 780 |
781 // Used by the FaviconService to mark the favicon for the page as being out | 781 // Used by the FaviconService to mark the favicon for the page as being out |
782 // of date. | 782 // of date. |
783 void SetFaviconsOutOfDateForPage(const GURL& page_url); | 783 void SetFaviconsOutOfDateForPage(const GURL& page_url); |
784 | 784 |
785 // Used by the FaviconService to clone favicons from one page to another, | 785 // Used by the FaviconService to clone favicons from one page to another, |
786 // provided that other page does not already have favicons. | 786 // provided that other page does not already have favicons. |
787 void CloneFavicons(const GURL& old_page_url, const GURL& new_page_url); | 787 void CloneFavicons(const GURL& old_page_url, const GURL& new_page_url); |
788 | 788 |
789 // Used by the FaviconService for importing many favicons for many pages at | 789 // Used by the FaviconService for importing many favicons for many pages at |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1040 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; | 1040 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; |
1041 | 1041 |
1042 ObserverList<history::VisitDatabaseObserver> visit_database_observers_; | 1042 ObserverList<history::VisitDatabaseObserver> visit_database_observers_; |
1043 | 1043 |
1044 history::DeleteDirectiveHandler delete_directive_handler_; | 1044 history::DeleteDirectiveHandler delete_directive_handler_; |
1045 | 1045 |
1046 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 1046 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
1047 }; | 1047 }; |
1048 | 1048 |
1049 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ | 1049 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ |
OLD | NEW |