OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_GAIA_USERINFO_PROFILE_DOWNLOADER_DELEGATE_H_ | |
6 #define CHROME_BROWSER_GAIA_USERINFO_PROFILE_DOWNLOADER_DELEGATE_H_ | |
7 #pragma once | |
8 | |
9 #include "base/basictypes.h" | |
10 | |
11 class SkBitmap; | |
12 class Profile; | |
13 | |
14 // Reports on success or failure of Profile download. It is OK to delete the | |
15 // |ProfileImageDownloader| instance in any of these handlers. | |
16 class ProfileDownloaderDelegate { | |
17 public: | |
18 virtual ~ProfileDownloaderDelegate() {} | |
19 | |
20 // Returns the desierd size of the profile image. | |
Ivan Korotkov
2011/11/15 11:05:08
desired
If 0, returns image of the originally uplo
sail
2011/11/15 20:17:22
Fixed
Ivan Korotkov
2011/11/17 08:37:12
It is implemented by Picasa :) /s0/ in URL will re
sail
2011/11/21 22:01:00
Done.
| |
21 virtual int GetDesiredImageSize() = 0; | |
22 | |
23 // Returns the signed in user's user name. | |
24 virtual std::string GetProfileUserName() = 0; | |
Ivan Korotkov
2011/11/15 11:05:08
AFAIK this is only used to check that logged_in_us
sail
2011/11/15 20:17:22
Done.
| |
25 | |
26 // Returns the browser profile associated with this download request. | |
27 virtual Profile* GetBrowserProfile() = 0; | |
28 | |
29 // Called when image is successfully downloaded and decoded. | |
30 virtual void OnDownloadSuccess(const string16& full_name, | |
Ivan Korotkov
2011/11/15 12:29:04
As discussed offline with Anton, it's a bad idea t
sail
2011/11/15 20:17:22
To simplify things I replaced the three OnDownload
| |
31 const SkBitmap& image) = 0; | |
32 | |
33 // Called on download failure. | |
34 virtual void OnDownloadFailure() {} | |
35 | |
36 // Called when user has the default profile image and we won't download | |
37 // it. | |
38 virtual void OnDownloadDefaultImage(const string16& full_name) {} | |
39 }; | |
40 | |
41 #endif // CHROME_BROWSER_GAIA_USERINFO_PROFILE_DOWNLOADER_DELEGATE_H_ | |
OLD | NEW |