OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_FAVICON_CORE_LARGE_ICON_SERVICE_H_ | 5 #ifndef COMPONENTS_FAVICON_CORE_LARGE_ICON_SERVICE_H_ |
6 #define COMPONENTS_FAVICON_CORE_LARGE_ICON_SERVICE_H_ | 6 #define COMPONENTS_FAVICON_CORE_LARGE_ICON_SERVICE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // For cases 2 and 3, this function returns the style of the fallback icon | 43 // For cases 2 and 3, this function returns the style of the fallback icon |
44 // instead of rendering an icon so clients can render the icon themselves. | 44 // instead of rendering an icon so clients can render the icon themselves. |
45 base::CancelableTaskTracker::TaskId GetLargeIconOrFallbackStyle( | 45 base::CancelableTaskTracker::TaskId GetLargeIconOrFallbackStyle( |
46 const GURL& page_url, | 46 const GURL& page_url, |
47 int min_source_size_in_pixel, | 47 int min_source_size_in_pixel, |
48 int desired_size_in_pixel, | 48 int desired_size_in_pixel, |
49 const favicon_base::LargeIconCallback& callback, | 49 const favicon_base::LargeIconCallback& callback, |
50 base::CancelableTaskTracker* tracker); | 50 base::CancelableTaskTracker* tracker); |
51 | 51 |
52 private: | 52 private: |
53 // For testing. | |
54 friend class TestLargeIconService; | |
55 | |
56 FaviconService* favicon_service_; | 53 FaviconService* favicon_service_; |
57 scoped_refptr<base::TaskRunner> background_task_runner_; | 54 scoped_refptr<base::TaskRunner> background_task_runner_; |
58 | 55 |
59 // A pre-populated list of icon types to consider when looking for large | 56 // A pre-populated list of icon types to consider when looking for large |
60 // icons. This is an optimization over populating an icon type vector on each | 57 // icons. This is an optimization over populating an icon type vector on each |
61 // request. | 58 // request. |
62 std::vector<int> large_icon_types_; | 59 std::vector<int> large_icon_types_; |
63 | 60 |
64 DISALLOW_COPY_AND_ASSIGN(LargeIconService); | 61 DISALLOW_COPY_AND_ASSIGN(LargeIconService); |
65 }; | 62 }; |
66 | 63 |
67 } // namespace favicon | 64 } // namespace favicon |
68 | 65 |
69 #endif // COMPONENTS_FAVICON_CORE_LARGE_ICON_SERVICE_H_ | 66 #endif // COMPONENTS_FAVICON_CORE_LARGE_ICON_SERVICE_H_ |
OLD | NEW |