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

Side by Side Diff: chrome/browser/dom_ui/dom_ui_thumbnail_source.h

Issue 288005: First fix to minimize copying of image data. (Closed)
Patch Set: Modify gyp Created 11 years, 2 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_DOM_UI_DOM_UI_THUMBNAIL_SOURCE_H_ 5 #ifndef CHROME_BROWSER_DOM_UI_DOM_UI_THUMBNAIL_SOURCE_H_
6 #define CHROME_BROWSER_DOM_UI_DOM_UI_THUMBNAIL_SOURCE_H_ 6 #define CHROME_BROWSER_DOM_UI_DOM_UI_THUMBNAIL_SOURCE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 const NotificationDetails& details); 46 const NotificationDetails& details);
47 47
48 // Fetch the specified resource. 48 // Fetch the specified resource.
49 void DoDataRequest(const std::string& path, int request_id); 49 void DoDataRequest(const std::string& path, int request_id);
50 50
51 Profile* profile_; 51 Profile* profile_;
52 CancelableRequestConsumerT<int, 0> cancelable_consumer_; 52 CancelableRequestConsumerT<int, 0> cancelable_consumer_;
53 53
54 // Raw PNG representation of the thumbnail to show when the thumbnail 54 // Raw PNG representation of the thumbnail to show when the thumbnail
55 // database doesn't have a thumbnail for a webpage. 55 // database doesn't have a thumbnail for a webpage.
56 scoped_refptr<RefCountedBytes> default_thumbnail_; 56 scoped_refptr<RefCountedMemory> default_thumbnail_;
57 57
58 // Store requests when the ThumbnailStore isn't ready. When a notification is 58 // Store requests when the ThumbnailStore isn't ready. When a notification is
59 // received that it is ready, then serve these requests. 59 // received that it is ready, then serve these requests.
60 std::vector<std::pair<std::string, int> > pending_requests_; 60 std::vector<std::pair<std::string, int> > pending_requests_;
61 61
62 // To register to be notified when the ThumbnailStore is ready. 62 // To register to be notified when the ThumbnailStore is ready.
63 NotificationRegistrar registrar_; 63 NotificationRegistrar registrar_;
64 64
65 DISALLOW_COPY_AND_ASSIGN(DOMUIThumbnailSource); 65 DISALLOW_COPY_AND_ASSIGN(DOMUIThumbnailSource);
66 }; 66 };
67 67
68 #endif // CHROME_BROWSER_DOM_UI_DOM_UI_THUMBNAIL_SOURCE_H_ 68 #endif // CHROME_BROWSER_DOM_UI_DOM_UI_THUMBNAIL_SOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698