| 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_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" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 history::IconType icon_type, | 66 history::IconType icon_type, |
| 67 const ImageDownloadCallback& callback); | 67 const ImageDownloadCallback& callback); |
| 68 | 68 |
| 69 // Message Handler. Must be public, because also called from | 69 // Message Handler. Must be public, because also called from |
| 70 // PrerenderContents. | 70 // PrerenderContents. |
| 71 void OnUpdateFaviconURL(int32 page_id, | 71 void OnUpdateFaviconURL(int32 page_id, |
| 72 const std::vector<FaviconURL>& candidates); | 72 const std::vector<FaviconURL>& candidates); |
| 73 | 73 |
| 74 // FaviconHandlerDelegate methods. | 74 // FaviconHandlerDelegate methods. |
| 75 virtual content::NavigationEntry* GetActiveEntry() OVERRIDE; | 75 virtual content::NavigationEntry* GetActiveEntry() OVERRIDE; |
| 76 virtual void StartDownload(int id, const GURL& url, int image_size) OVERRIDE; | 76 virtual int StartDownload(const GURL& url, int image_size) OVERRIDE; |
| 77 virtual void NotifyFaviconUpdated() OVERRIDE; | 77 virtual void NotifyFaviconUpdated() OVERRIDE; |
| 78 | 78 |
| 79 private: | 79 private: |
| 80 // content::WebContentsObserver overrides. | 80 // content::WebContentsObserver overrides. |
| 81 virtual void NavigateToPendingEntry( | 81 virtual void NavigateToPendingEntry( |
| 82 const GURL& url, | 82 const GURL& url, |
| 83 content::NavigationController::ReloadType reload_type) OVERRIDE; | 83 content::NavigationController::ReloadType reload_type) OVERRIDE; |
| 84 virtual void DidNavigateMainFrame( | 84 virtual void DidNavigateMainFrame( |
| 85 const content::LoadCommittedDetails& details, | 85 const content::LoadCommittedDetails& details, |
| 86 const content::FrameNavigateParams& params) OVERRIDE; | 86 const content::FrameNavigateParams& params) OVERRIDE; |
| 87 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 87 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 88 | 88 |
| 89 void OnDidDownloadFavicon(int id, | 89 void OnDidDownloadFavicon(int id, |
| 90 const GURL& image_url, | 90 const GURL& image_url, |
| 91 bool errored, | 91 bool errored, |
| 92 const SkBitmap& image); | 92 const SkBitmap& image); |
| 93 | 93 |
| 94 Profile* profile_; | 94 Profile* profile_; |
| 95 | 95 |
| 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 |