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 <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 17 matching lines...) Expand all Loading... |
28 ANY | 28 ANY |
29 }; | 29 }; |
30 | 30 |
31 // |type| is the type of icon this FaviconSource will provide. | 31 // |type| is the type of icon this FaviconSource will provide. |
32 FaviconSource(Profile* profile, IconType type); | 32 FaviconSource(Profile* profile, IconType type); |
33 | 33 |
34 // Called when the network layer has requested a resource underneath | 34 // Called when the network layer has requested a resource underneath |
35 // the path we registered. | 35 // the path we registered. |
36 virtual void StartDataRequest(const std::string& path, | 36 virtual void StartDataRequest(const std::string& path, |
37 bool is_incognito, | 37 bool is_incognito, |
38 int request_id); | 38 int request_id) OVERRIDE; |
39 | 39 |
40 virtual std::string GetMimeType(const std::string&) const; | 40 virtual std::string GetMimeType(const std::string&) const OVERRIDE; |
41 | 41 |
42 virtual bool ShouldReplaceExistingSource() const; | 42 virtual bool ShouldReplaceExistingSource() const OVERRIDE; |
43 | 43 |
44 private: | 44 private: |
45 // Called when favicon data is available from the history backend. | 45 // Called when favicon data is available from the history backend. |
46 void OnFaviconDataAvailable(FaviconService::Handle request_handle, | 46 void OnFaviconDataAvailable(FaviconService::Handle request_handle, |
47 history::FaviconData favicon); | 47 history::FaviconData favicon); |
48 | 48 |
49 // Sends the default favicon. | 49 // Sends the default favicon. |
50 void SendDefaultResponse(int request_id); | 50 void SendDefaultResponse(int request_id); |
51 | 51 |
52 virtual ~FaviconSource(); | 52 virtual ~FaviconSource(); |
(...skipping 12 matching lines...) Expand all Loading... |
65 // 32x32 | 65 // 32x32 |
66 scoped_refptr<RefCountedMemory> default_favicon_large_; | 66 scoped_refptr<RefCountedMemory> default_favicon_large_; |
67 | 67 |
68 // The history::IconTypes of icon that this FaviconSource handles. | 68 // The history::IconTypes of icon that this FaviconSource handles. |
69 const int icon_types_; | 69 const int icon_types_; |
70 | 70 |
71 DISALLOW_COPY_AND_ASSIGN(FaviconSource); | 71 DISALLOW_COPY_AND_ASSIGN(FaviconSource); |
72 }; | 72 }; |
73 | 73 |
74 #endif // CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_ | 74 #endif // CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_ |
OLD | NEW |