OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_BOOKMARKS_CORE_BROWSER_BOOKMARK_CLIENT_H_ | 5 #ifndef COMPONENTS_BOOKMARKS_CORE_BROWSER_BOOKMARK_CLIENT_H_ |
6 #define COMPONENTS_BOOKMARKS_CORE_BROWSER_BOOKMARK_CLIENT_H_ | 6 #define COMPONENTS_BOOKMARKS_CORE_BROWSER_BOOKMARK_CLIENT_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 FaviconImageCallback; | 31 FaviconImageCallback; |
32 | 32 |
33 // Types representing a set of BookmarkNode and a mapping from BookmarkNode | 33 // Types representing a set of BookmarkNode and a mapping from BookmarkNode |
34 // to the number of time the corresponding URL has been typed by the user in | 34 // to the number of time the corresponding URL has been typed by the user in |
35 // the Omnibox. | 35 // the Omnibox. |
36 typedef std::set<const BookmarkNode*> NodeSet; | 36 typedef std::set<const BookmarkNode*> NodeSet; |
37 typedef std::pair<const BookmarkNode*, int> NodeTypedCountPair; | 37 typedef std::pair<const BookmarkNode*, int> NodeTypedCountPair; |
38 typedef std::vector<NodeTypedCountPair> NodeTypedCountPairs; | 38 typedef std::vector<NodeTypedCountPair> NodeTypedCountPairs; |
39 | 39 |
40 // Returns true if the embedder favors touch icons over favicons. | 40 // Returns true if the embedder favors touch icons over favicons. |
41 virtual bool PreferTouchIcon() = 0; | 41 virtual bool PreferTouchIcon(); |
42 | 42 |
43 // Requests the favicon of any of |icon_types| whose pixel sizes most | 43 // Requests the favicon of any of |icon_types| whose pixel sizes most |
44 // closely match |desired_size_in_dip| (if value is 0, the largest favicon | 44 // closely match |desired_size_in_dip| (if value is 0, the largest favicon |
45 // is returned) and desired scale factor for |page_url|. |callback| is run | 45 // is returned) and desired scale factor for |page_url|. |callback| is run |
46 // when the bits have been fetched. |icon_types| can be any combination of | 46 // when the bits have been fetched. |icon_types| can be any combination of |
47 // IconType value, but only one icon will be returned. | 47 // IconType value, but only one icon will be returned. |
48 virtual base::CancelableTaskTracker::TaskId GetFaviconImageForURL( | 48 virtual base::CancelableTaskTracker::TaskId GetFaviconImageForURL( |
49 const GURL& page_url, | 49 const GURL& page_url, |
50 int icon_types, | 50 int icon_types, |
51 int desired_size_in_dip, | 51 int desired_size_in_dip, |
(...skipping 11 matching lines...) Expand all Loading... |
63 | 63 |
64 // Wrapper around RecordAction defined in base/metrics/user_metrics.h | 64 // Wrapper around RecordAction defined in base/metrics/user_metrics.h |
65 // that ensure that the action is posted from the correct thread. | 65 // that ensure that the action is posted from the correct thread. |
66 virtual void RecordAction(const base::UserMetricsAction& action) = 0; | 66 virtual void RecordAction(const base::UserMetricsAction& action) = 0; |
67 | 67 |
68 protected: | 68 protected: |
69 virtual ~BookmarkClient() {} | 69 virtual ~BookmarkClient() {} |
70 }; | 70 }; |
71 | 71 |
72 #endif // COMPONENTS_BOOKMARKS_CORE_BROWSER_BOOKMARK_CLIENT_H_ | 72 #endif // COMPONENTS_BOOKMARKS_CORE_BROWSER_BOOKMARK_CLIENT_H_ |
OLD | NEW |