OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_ANDROID_THUMBNAIL_THUMBNAIL_STORE_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_THUMBNAIL_THUMBNAIL_STORE_H_ |
6 #define CHROME_BROWSER_ANDROID_THUMBNAIL_THUMBNAIL_STORE_H_ | 6 #define CHROME_BROWSER_ANDROID_THUMBNAIL_THUMBNAIL_STORE_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 void RemoveFromReadQueue(TabId tab_id); | 103 void RemoveFromReadQueue(TabId tab_id); |
104 base::FilePath GetFilePath(TabId tab_id) const; | 104 base::FilePath GetFilePath(TabId tab_id) const; |
105 static void WriteTask(const base::FilePath& file_path, | 105 static void WriteTask(const base::FilePath& file_path, |
106 skia::RefPtr<SkPixelRef> compressed_data, | 106 skia::RefPtr<SkPixelRef> compressed_data, |
107 float scale, | 107 float scale, |
108 const gfx::Size& content_size, | 108 const gfx::Size& content_size, |
109 const base::Callback<void()>& post_write_task); | 109 const base::Callback<void()>& post_write_task); |
110 void PostWriteTask(); | 110 void PostWriteTask(); |
111 static void CompressionTask( | 111 static void CompressionTask( |
112 SkBitmap raw_data, | 112 SkBitmap raw_data, |
| 113 gfx::Size encoded_size, |
113 const base::Callback<void(skia::RefPtr<SkPixelRef>, const gfx::Size&)>& | 114 const base::Callback<void(skia::RefPtr<SkPixelRef>, const gfx::Size&)>& |
114 post_compression_task); | 115 post_compression_task); |
115 void PostCompressionTask(TabId tab_id, | 116 void PostCompressionTask(TabId tab_id, |
116 const base::Time& time_stamp, | 117 const base::Time& time_stamp, |
117 float scale, | 118 float scale, |
118 skia::RefPtr<SkPixelRef> compressed_data, | 119 skia::RefPtr<SkPixelRef> compressed_data, |
119 const gfx::Size& content_size); | 120 const gfx::Size& content_size); |
120 static void ReadTask( | 121 static void ReadTask( |
121 const base::FilePath& file_path, | 122 const base::FilePath& file_path, |
122 const base::Callback< | 123 const base::Callback< |
(...skipping 25 matching lines...) Expand all Loading... |
148 TabIdList visible_ids_; | 149 TabIdList visible_ids_; |
149 | 150 |
150 content::UIResourceProvider* ui_resource_provider_; | 151 content::UIResourceProvider* ui_resource_provider_; |
151 | 152 |
152 base::WeakPtrFactory<ThumbnailStore> weak_factory_; | 153 base::WeakPtrFactory<ThumbnailStore> weak_factory_; |
153 | 154 |
154 DISALLOW_COPY_AND_ASSIGN(ThumbnailStore); | 155 DISALLOW_COPY_AND_ASSIGN(ThumbnailStore); |
155 }; | 156 }; |
156 | 157 |
157 #endif // CHROME_BROWSER_ANDROID_THUMBNAIL_THUMBNAIL_STORE_H_ | 158 #endif // CHROME_BROWSER_ANDROID_THUMBNAIL_THUMBNAIL_STORE_H_ |
OLD | NEW |