OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_FAVICON_FAVICON_TAB_HELPER_H_ | 5 #ifndef CHROME_BROWSER_FAVICON_FAVICON_TAB_HELPER_H_ |
6 #define CHROME_BROWSER_FAVICON_FAVICON_TAB_HELPER_H_ | 6 #define CHROME_BROWSER_FAVICON_FAVICON_TAB_HELPER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "chrome/browser/favicon/favicon_download_helper_delegate.h" | 12 #include "chrome/browser/favicon/favicon_download_helper_delegate.h" |
13 #include "chrome/browser/favicon/favicon_handler_delegate.h" | 13 #include "chrome/browser/favicon/favicon_handler_delegate.h" |
14 #include "chrome/browser/history/history_types.h" | 14 #include "chrome/browser/history/history_types.h" |
15 #include "chrome/common/favicon_url.h" | |
16 #include "content/public/browser/web_contents_observer.h" | 15 #include "content/public/browser/web_contents_observer.h" |
17 #include "content/public/browser/web_contents_user_data.h" | 16 #include "content/public/browser/web_contents_user_data.h" |
| 17 #include "content/public/common/favicon_url.h" |
18 | 18 |
19 namespace gfx { | 19 namespace gfx { |
20 class Image; | 20 class Image; |
21 } | 21 } |
22 | 22 |
23 class GURL; | 23 class GURL; |
24 class FaviconDownloadHelper; | 24 class FaviconDownloadHelper; |
25 class FaviconHandler; | 25 class FaviconHandler; |
26 class Profile; | 26 class Profile; |
27 class SkBitmap; | 27 class SkBitmap; |
(...skipping 24 matching lines...) Expand all Loading... |
52 bool FaviconIsValid() const; | 52 bool FaviconIsValid() const; |
53 | 53 |
54 // Returns whether the favicon should be displayed. If this returns false, no | 54 // Returns whether the favicon should be displayed. If this returns false, no |
55 // space is provided for the favicon, and the favicon is never displayed. | 55 // space is provided for the favicon, and the favicon is never displayed. |
56 virtual bool ShouldDisplayFavicon(); | 56 virtual bool ShouldDisplayFavicon(); |
57 | 57 |
58 // Message Handler. Must be public, because also called from | 58 // Message Handler. Must be public, because also called from |
59 // PrerenderContents. | 59 // PrerenderContents. |
60 virtual void OnUpdateFaviconURL( | 60 virtual void OnUpdateFaviconURL( |
61 int32 page_id, | 61 int32 page_id, |
62 const std::vector<FaviconURL>& candidates) OVERRIDE; | 62 const std::vector<content::FaviconURL>& candidates) OVERRIDE; |
63 | 63 |
64 // Saves the favicon for the current page. | 64 // Saves the favicon for the current page. |
65 void SaveFavicon(); | 65 void SaveFavicon(); |
66 | 66 |
67 // FaviconHandlerDelegate methods. | 67 // FaviconHandlerDelegate methods. |
68 virtual content::NavigationEntry* GetActiveEntry() OVERRIDE; | 68 virtual content::NavigationEntry* GetActiveEntry() OVERRIDE; |
69 virtual int StartDownload(const GURL& url, int image_size) OVERRIDE; | 69 virtual int StartDownload(const GURL& url, int image_size) OVERRIDE; |
70 virtual void NotifyFaviconUpdated() OVERRIDE; | 70 virtual void NotifyFaviconUpdated() OVERRIDE; |
71 | 71 |
72 private: | 72 private: |
(...skipping 23 matching lines...) Expand all Loading... |
96 scoped_ptr<FaviconHandler> favicon_handler_; | 96 scoped_ptr<FaviconHandler> favicon_handler_; |
97 | 97 |
98 // Handles downloading touchicons. It is NULL if | 98 // Handles downloading touchicons. It is NULL if |
99 // browser_defaults::kEnableTouchIcon is false. | 99 // browser_defaults::kEnableTouchIcon is false. |
100 scoped_ptr<FaviconHandler> touch_icon_handler_; | 100 scoped_ptr<FaviconHandler> touch_icon_handler_; |
101 | 101 |
102 DISALLOW_COPY_AND_ASSIGN(FaviconTabHelper); | 102 DISALLOW_COPY_AND_ASSIGN(FaviconTabHelper); |
103 }; | 103 }; |
104 | 104 |
105 #endif // CHROME_BROWSER_FAVICON_FAVICON_TAB_HELPER_H_ | 105 #endif // CHROME_BROWSER_FAVICON_FAVICON_TAB_HELPER_H_ |
OLD | NEW |