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

Side by Side Diff: components/favicon/core/favicon_driver_observer.h

Issue 2795763004: Treat touch icons just like non-touch icons on mobile
Patch Set: Created 3 years, 8 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 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_FAVICON_CORE_FAVICON_DRIVER_OBSERVER_H_ 5 #ifndef COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_OBSERVER_H_
6 #define COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_OBSERVER_H_ 6 #define COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_OBSERVER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 9
10 namespace gfx { 10 namespace gfx {
11 class Image; 11 class Image;
12 } 12 }
13 13
14 class GURL; 14 class GURL;
15 15
16 namespace favicon { 16 namespace favicon {
17 17
18 class FaviconDriver; 18 class FaviconDriver;
19 19
20 // An observer implemented by classes which are interested in event from 20 // An observer implemented by classes which are interested in event from
21 // FaviconDriver. 21 // FaviconDriver.
22 class FaviconDriverObserver { 22 class FaviconDriverObserver {
23 public: 23 public:
24 // The type of the icon in the OnFaviconUpdated() notification. 24 // The type of the icon in the OnFaviconUpdated() notification.
25 enum NotificationIconType { 25 enum NotificationIconType {
26 // Multi-resolution 16x16 (gfx::kFaviconSize) device independant pixel 26 // Multi-resolution 16x16 (gfx::kFaviconSize) device independant pixel
27 // favicon of type favicon_base::FAVICON. If the page does not provide a 27 // favicon of type favicon_base::FAVICON. If the page does not provide a
28 // 16x16 DIP icon, the icon is generated by resizing another icon. 28 // 16x16 DIP icon, the icon is generated by resizing another icon.
29 NON_TOUCH_16_DIP, 29 NON_TOUCH_16_DIP,
30 // Largest icon specified by the page which is of type 30 // Largest icon specified by the page, of any type (includes favicons and
31 // favicon_base::FAVICON. 31 // touch icons).
32 NON_TOUCH_LARGEST, 32 LARGEST
33 // Largest icon specified by the page which is of type
34 // favicon_base::TOUCH_ICON or of type favicon_base::TOUCH_PRECOMPOSED_ICON.
35 TOUCH_LARGEST
36 }; 33 };
37 34
38 FaviconDriverObserver() {} 35 FaviconDriverObserver() {}
39 virtual ~FaviconDriverObserver() {} 36 virtual ~FaviconDriverObserver() {}
40 37
41 // Called when either: 38 // Called when either:
42 // 1) Chrome determines the best icon for the page for 39 // 1) Chrome determines the best icon for the page for
43 // |notification_icon_type|. 40 // |notification_icon_type|.
44 // Not called if the site does not provide a custom icon and the best icon 41 // Not called if the site does not provide a custom icon and the best icon
45 // for the page is the default one provided by Chrome. 42 // for the page is the default one provided by Chrome.
(...skipping 17 matching lines...) Expand all
63 bool icon_url_changed, 60 bool icon_url_changed,
64 const gfx::Image& image) = 0; 61 const gfx::Image& image) = 0;
65 62
66 private: 63 private:
67 DISALLOW_COPY_AND_ASSIGN(FaviconDriverObserver); 64 DISALLOW_COPY_AND_ASSIGN(FaviconDriverObserver);
68 }; 65 };
69 66
70 } // namespace favicon 67 } // namespace favicon
71 68
72 #endif // COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_OBSERVER_H_ 69 #endif // COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698