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

Unified Diff: chrome/browser/ui/webui/options2/chromeos/wallpaper_source.h

Issue 10790084: Refactor the wallpaper encoding to another file/class. (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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/options2/chromeos/wallpaper_source.h
diff --git a/chrome/browser/ui/webui/options2/chromeos/wallpaper_source.h b/chrome/browser/ui/webui/options2/chromeos/wallpaper_source.h
index 917264b62cc69486e4d1f77e3390120a4a1996ed..8fcf56f283dc41f61b6759c48cc5ab95d99089a2 100644
--- a/chrome/browser/ui/webui/options2/chromeos/wallpaper_source.h
+++ b/chrome/browser/ui/webui/options2/chromeos/wallpaper_source.h
@@ -14,6 +14,9 @@
#include "third_party/skia/include/core/SkBitmap.h"
namespace chromeos {
+
+class SimplePngEncoder;
+
namespace options2 {
// A DataSource for chrome://wallpaper/ URL, provides current user's wallpaper.
@@ -43,12 +46,15 @@ class WallpaperImageSource : public ChromeURLDataManager::DataSource {
// Cancel current image encoding operation.
void CancelPendingEncodingOperation();
- // Send image stored in |data| as a reply to request
+ // Callback to call if we cancel the wallpaper encode operation.
+ void CancelCallback(int request_id);
+
+ // Send image stored in |data| as a reply to request
// identifed by |request_id|.
void SendCurrentUserWallpaper(int request_id,
scoped_refptr<base::RefCountedBytes> data);
- scoped_refptr<WallpaperEncodingOperation> wallpaper_encoding_op_;
+ scoped_refptr<SimplePngEncoder> png_encoder_;
base::WeakPtrFactory<WallpaperImageSource> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698