Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: chrome/browser/history/history_service.h

Issue 26563004: Find Favicon in priority of icon_type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 favicon bitmap whose width and
711 // height are greater than 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 |icon_types[0]| is not larger than
715 // |minimum_size_in_pixel|, the next icon types of
716 // |icon_types| will be searched and so on.
717 // If no icon is larger than |minimum_size_in_pixel|, the largest one of all
718 // 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::FaviconRawCallback& callback,
sky 2013/10/18 14:11:40 Update docs for FaviconRawCallback too.
michaelbai 2013/10/18 17:31:48 Done.
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/history/history_backend_unittest.cc ('k') | chrome/browser/history/history_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698