OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 bool is_off_the_record, | 28 bool is_off_the_record, |
29 int request_id); | 29 int request_id); |
30 | 30 |
31 virtual std::string GetMimeType(const std::string&) const; | 31 virtual std::string GetMimeType(const std::string&) const; |
32 | 32 |
33 virtual bool ShouldReplaceExistingSource() const; | 33 virtual bool ShouldReplaceExistingSource() const; |
34 | 34 |
35 private: | 35 private: |
36 // Called when favicon data is available from the history backend. | 36 // Called when favicon data is available from the history backend. |
37 void OnFaviconDataAvailable(FaviconService::Handle request_handle, | 37 void OnFaviconDataAvailable(FaviconService::Handle request_handle, |
38 bool know_favicon, | 38 history::FaviconData favicon); |
39 scoped_refptr<RefCountedMemory> data, | |
40 bool expired, | |
41 GURL url); | |
42 | 39 |
43 // Sends the default favicon. | 40 // Sends the default favicon. |
44 void SendDefaultResponse(int request_id); | 41 void SendDefaultResponse(int request_id); |
45 | 42 |
46 virtual ~FaviconSource(); | 43 virtual ~FaviconSource(); |
47 | 44 |
48 Profile* profile_; | 45 Profile* profile_; |
49 CancelableRequestConsumerT<int, 0> cancelable_consumer_; | 46 CancelableRequestConsumerT<int, 0> cancelable_consumer_; |
50 | 47 |
51 // Raw PNG representation of the favicon to show when the favicon | 48 // Raw PNG representation of the favicon to show when the favicon |
52 // database doesn't have a favicon for a webpage. | 49 // database doesn't have a favicon for a webpage. |
53 scoped_refptr<RefCountedMemory> default_favicon_; | 50 scoped_refptr<RefCountedMemory> default_favicon_; |
54 | 51 |
55 DISALLOW_COPY_AND_ASSIGN(FaviconSource); | 52 DISALLOW_COPY_AND_ASSIGN(FaviconSource); |
56 }; | 53 }; |
57 | 54 |
58 #endif // CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_ | 55 #endif // CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_ |
OLD | NEW |