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

Unified Diff: chrome/browser/chromeos/login/user_image_loader.h

Issue 10454044: Added support for animated/nonanimated user image. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 7 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/chromeos/login/user_image_loader.h
diff --git a/chrome/browser/chromeos/login/user_image_loader.h b/chrome/browser/chromeos/login/user_image_loader.h
index ed8d88979820261adeff4dee76016ab23f134a2e..1a1dc322c8ed6f74d7e0c022fb913860fce4a12e 100644
--- a/chrome/browser/chromeos/login/user_image_loader.h
+++ b/chrome/browser/chromeos/login/user_image_loader.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -19,20 +19,23 @@ class SkBitmap;
namespace chromeos {
+class UserImage;
+
// A facility to read a file containing user image asynchronously in the IO
// thread. Returns the image in the form of an SkBitmap.
class UserImageLoader : public base::RefCountedThreadSafe<UserImageLoader>,
public ImageDecoder::Delegate {
public:
// Callback used to inidicate that image has been loaded.
- typedef base::Callback<void(const SkBitmap& image)> LoadedCallback;
+ typedef base::Callback<void(const UserImage& user_image)> LoadedCallback;
UserImageLoader();
// Start reading the image from |filepath| on the file thread. Calls
// |loaded_cb| when image has been successfully loaded.
// If |size| is positive, image is resized to |size|x|size| pixels.
- void Start(const std::string& filepath, int size,
+ // If |save_raw_image| is true, raw image is also passed to callback.
Ivan Korotkov 2012/05/29 10:50:23 It should probably be |load_raw_image|, right?
ygorshenin1 2012/05/30 12:17:34 Done.
+ void Start(const std::string& filepath, int size, bool save_raw_image,
const LoadedCallback& loaded_cb);
private:
@@ -40,10 +43,11 @@ class UserImageLoader : public base::RefCountedThreadSafe<UserImageLoader>,
// Contains attributes we need to know about each image we decode.
struct ImageInfo {
- ImageInfo(int size, const LoadedCallback& loaded_cb);
+ ImageInfo(int size, bool save_raw_image, const LoadedCallback& loaded_cb);
~ImageInfo();
int size;
+ bool save_raw_image;
LoadedCallback loaded_cb;
};

Powered by Google App Engine
This is Rietveld 408576698