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

Side by Side Diff: chrome/browser/ui/cocoa/history_menu_bridge.h

Issue 6651014: Applied the IconType. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: sync Created 9 years, 9 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_UI_COCOA_HISTORY_MENU_BRIDGE_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_HISTORY_MENU_BRIDGE_H_
6 #define CHROME_BROWSER_UI_COCOA_HISTORY_MENU_BRIDGE_H_ 6 #define CHROME_BROWSER_UI_COCOA_HISTORY_MENU_BRIDGE_H_
7 #pragma once 7 #pragma once
8 8
9 #import <Cocoa/Cocoa.h> 9 #import <Cocoa/Cocoa.h>
10 #include <map> 10 #include <map>
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 180
181 // Helper function that sends an async request to the FaviconService to get 181 // Helper function that sends an async request to the FaviconService to get
182 // an icon. The callback will update the NSMenuItem directly. 182 // an icon. The callback will update the NSMenuItem directly.
183 void GetFaviconForHistoryItem(HistoryItem* item); 183 void GetFaviconForHistoryItem(HistoryItem* item);
184 184
185 // Callback for the FaviconService to return favicon image data when we 185 // Callback for the FaviconService to return favicon image data when we
186 // request it. This decodes the raw data, updates the HistoryItem, and then 186 // request it. This decodes the raw data, updates the HistoryItem, and then
187 // sets the image on the menu. Called on the same same thread that 187 // sets the image on the menu. Called on the same same thread that
188 // GetFaviconForHistoryItem() was called on (UI thread). 188 // GetFaviconForHistoryItem() was called on (UI thread).
189 void GotFaviconData(FaviconService::Handle handle, 189 void GotFaviconData(FaviconService::Handle handle,
190 bool know_favicon, 190 history::FaviconData favicon);
191 scoped_refptr<RefCountedMemory> data,
192 bool expired,
193 GURL url);
194 191
195 // Cancels a favicon load request for a given HistoryItem, if one is in 192 // Cancels a favicon load request for a given HistoryItem, if one is in
196 // progress. 193 // progress.
197 void CancelFaviconRequest(HistoryItem* item); 194 void CancelFaviconRequest(HistoryItem* item);
198 195
199 private: 196 private:
200 friend class ::HistoryMenuBridgeTest; 197 friend class ::HistoryMenuBridgeTest;
201 friend class HistoryMenuCocoaControllerTest; 198 friend class HistoryMenuCocoaControllerTest;
202 199
203 scoped_nsobject<HistoryMenuCocoaController> controller_; // strong 200 scoped_nsobject<HistoryMenuCocoaController> controller_; // strong
(...skipping 19 matching lines...) Expand all
223 bool create_in_progress_; 220 bool create_in_progress_;
224 bool need_recreate_; 221 bool need_recreate_;
225 222
226 // The default favicon if a HistoryItem does not have one. 223 // The default favicon if a HistoryItem does not have one.
227 scoped_nsobject<NSImage> default_favicon_; 224 scoped_nsobject<NSImage> default_favicon_;
228 225
229 DISALLOW_COPY_AND_ASSIGN(HistoryMenuBridge); 226 DISALLOW_COPY_AND_ASSIGN(HistoryMenuBridge);
230 }; 227 };
231 228
232 #endif // CHROME_BROWSER_UI_COCOA_HISTORY_MENU_BRIDGE_H_ 229 #endif // CHROME_BROWSER_UI_COCOA_HISTORY_MENU_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698