Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(400)

Side by Side Diff: chrome/browser/favicon/favicon_tab_helper.h

Issue 10765021: Make the id used in IconMsg_DownloadFavicon unique (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 history::IconType icon_type, 67 history::IconType icon_type,
68 const ImageDownloadCallback& callback); 68 const ImageDownloadCallback& callback);
69 69
70 // Message Handler. Must be public, because also called from 70 // Message Handler. Must be public, because also called from
71 // PrerenderContents. 71 // PrerenderContents.
72 void OnUpdateFaviconURL(int32 page_id, 72 void OnUpdateFaviconURL(int32 page_id,
73 const std::vector<FaviconURL>& candidates); 73 const std::vector<FaviconURL>& candidates);
74 74
75 // FaviconHandlerDelegate methods. 75 // FaviconHandlerDelegate methods.
76 virtual content::NavigationEntry* GetActiveEntry() OVERRIDE; 76 virtual content::NavigationEntry* GetActiveEntry() OVERRIDE;
77 virtual void StartDownload(int id, const GURL& url, int image_size) OVERRIDE; 77 virtual int StartDownload(const GURL& url, int image_size) OVERRIDE;
78 virtual void NotifyFaviconUpdated() OVERRIDE; 78 virtual void NotifyFaviconUpdated() OVERRIDE;
79 79
80 private: 80 private:
81 // content::WebContentsObserver overrides. 81 // content::WebContentsObserver overrides.
82 virtual void NavigateToPendingEntry( 82 virtual void NavigateToPendingEntry(
83 const GURL& url, 83 const GURL& url,
84 content::NavigationController::ReloadType reload_type) OVERRIDE; 84 content::NavigationController::ReloadType reload_type) OVERRIDE;
85 virtual void DidNavigateMainFrame( 85 virtual void DidNavigateMainFrame(
86 const content::LoadCommittedDetails& details, 86 const content::LoadCommittedDetails& details,
87 const content::FrameNavigateParams& params) OVERRIDE; 87 const content::FrameNavigateParams& params) OVERRIDE;
88 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 88 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
89 89
90 void OnDidDownloadFavicon(int id, 90 void OnDidDownloadFavicon(int id,
91 const GURL& image_url, 91 const GURL& image_url,
92 bool errored, 92 bool errored,
93 const SkBitmap& image); 93 const SkBitmap& image);
94 94
95 Profile* profile_; 95 Profile* profile_;
96 96
97 scoped_ptr<FaviconHandler> favicon_handler_; 97 scoped_ptr<FaviconHandler> favicon_handler_;
98 98
99 // Handles downloading touchicons. It is NULL if 99 // Handles downloading touchicons. It is NULL if
100 // browser_defaults::kEnableTouchIcon is false. 100 // browser_defaults::kEnableTouchIcon is false.
101 scoped_ptr<FaviconHandler> touch_icon_handler_; 101 scoped_ptr<FaviconHandler> touch_icon_handler_;
102 102
103 DISALLOW_COPY_AND_ASSIGN(FaviconTabHelper); 103 DISALLOW_COPY_AND_ASSIGN(FaviconTabHelper);
104 }; 104 };
105 105
106 #endif // CHROME_BROWSER_FAVICON_FAVICON_TAB_HELPER_H_ 106 #endif // CHROME_BROWSER_FAVICON_FAVICON_TAB_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698