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_H_ | 5 #ifndef COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_H_ |
6 #define COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_H_ | 6 #define COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_H_ |
7 | 7 |
8 class GURL; | 8 class GURL; |
9 | 9 |
| 10 namespace gfx { |
| 11 class Image; |
| 12 } |
| 13 |
10 namespace content { | 14 namespace content { |
11 // TODO(jif): Abstract the NavigationEntry (crbug.com/359598). | 15 // TODO(jif): Abstract the NavigationEntry (crbug.com/359598). |
12 class NavigationEntry; | 16 class NavigationEntry; |
13 } | 17 } |
14 | 18 |
15 // Interface that allows Favicon core code to interact with its driver (i.e., | 19 // Interface that allows Favicon core code to interact with its driver (i.e., |
16 // obtain information from it and give information to it). A concrete | 20 // obtain information from it and give information to it). A concrete |
17 // implementation must be provided by the driver. | 21 // implementation must be provided by the driver. |
18 class FaviconDriver { | 22 class FaviconDriver { |
19 public: | 23 public: |
(...skipping 11 matching lines...) Expand all Loading... |
31 // is the only result. A |max_bitmap_size| of 0 means unlimited. | 35 // is the only result. A |max_bitmap_size| of 0 means unlimited. |
32 virtual int StartDownload(const GURL& url, int max_bitmap_size) = 0; | 36 virtual int StartDownload(const GURL& url, int max_bitmap_size) = 0; |
33 | 37 |
34 // Notifies the driver that the favicon for the active entry was updated. | 38 // Notifies the driver that the favicon for the active entry was updated. |
35 // |icon_url_changed| is true if a favicon with a different icon URL has | 39 // |icon_url_changed| is true if a favicon with a different icon URL has |
36 // been selected since the previous call to NotifyFaviconUpdated(). | 40 // been selected since the previous call to NotifyFaviconUpdated(). |
37 virtual void NotifyFaviconUpdated(bool icon_url_changed) = 0; | 41 virtual void NotifyFaviconUpdated(bool icon_url_changed) = 0; |
38 | 42 |
39 // Returns whether the user is operating in an off-the-record context. | 43 // Returns whether the user is operating in an off-the-record context. |
40 virtual bool IsOffTheRecord() = 0; | 44 virtual bool IsOffTheRecord() = 0; |
| 45 |
| 46 virtual const GURL GetActiveURL() = 0; |
| 47 |
| 48 virtual const GURL GetActiveFaviconURL() = 0; |
| 49 |
| 50 virtual bool GetActiveFaviconValidity() = 0; |
| 51 |
| 52 virtual void SetActiveFaviconValidity(bool validity) = 0; |
| 53 |
| 54 virtual void SetActiveFaviconImage(gfx::Image image) = 0; |
| 55 |
| 56 virtual void SetActiveFaviconURL(GURL url) = 0; |
41 }; | 57 }; |
42 | 58 |
43 #endif // COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_H_ | 59 #endif // COMPONENTS_FAVICON_CORE_FAVICON_DRIVER_H_ |
OLD | NEW |