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_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 namespace favicon { | 14 namespace favicon { |
15 | 15 |
| 16 class FaviconDriver; |
| 17 |
16 // An observer implemented by classes which are interested in event from | 18 // An observer implemented by classes which are interested in event from |
17 // FaviconDriver. | 19 // FaviconDriver. |
18 class FaviconDriverObserver { | 20 class FaviconDriverObserver { |
19 public: | 21 public: |
20 FaviconDriverObserver() {} | 22 FaviconDriverObserver() {} |
21 virtual ~FaviconDriverObserver() {} | 23 virtual ~FaviconDriverObserver() {} |
22 | 24 |
23 // Called when favicon |image| is retrieved from either web site or cached | 25 // Called when favicon |image| is retrieved from either web site or cached |
24 // storage. | 26 // storage. |
25 virtual void OnFaviconAvailable(const gfx::Image& image) = 0; | 27 virtual void OnFaviconAvailable(const gfx::Image& image) = 0; |
26 | 28 |
| 29 // Called when favicon has changed for the current page. |icon_url_changed| is |
| 30 // true if the favicon URL has also changed. |
| 31 virtual void OnFaviconUpdated(FaviconDriver* favicon_driver, |
| 32 bool icon_url_changed) = 0; |
| 33 |
27 private: | 34 private: |
28 DISALLOW_COPY_AND_ASSIGN(FaviconDriverObserver); | 35 DISALLOW_COPY_AND_ASSIGN(FaviconDriverObserver); |
29 }; | 36 }; |
30 | 37 |
31 } // namespace favicon | 38 } // namespace favicon |
32 | 39 |
33 #endif // COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_OBSERVER_H_ | 40 #endif // COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_OBSERVER_H_ |
OLD | NEW |