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_PROFILES_PROFILE_DOWNLOADER_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_PROFILES_PROFILE_DOWNLOADER_DELEGATE_H_ |
| 7 #pragma once |
| 8 |
| 9 #include <string> |
| 10 |
| 11 #include "base/basictypes.h" |
| 12 #include "base/string16.h" |
| 13 |
| 14 class Profile; |
| 15 class ProfileDownloader; |
| 16 |
| 17 // Reports on success or failure of Profile download. It is OK to delete the |
| 18 // |ProfileImageDownloader| instance in any of these handlers. |
| 19 class ProfileDownloaderDelegate { |
| 20 public: |
| 21 virtual ~ProfileDownloaderDelegate() {} |
| 22 |
| 23 // Returns the desired side length of the profile image. If 0, returns image |
| 24 // of the originally uploaded size. |
| 25 virtual int GetDesiredImageSideLength() = 0; |
| 26 |
| 27 // Returns the browser profile associated with this download request. |
| 28 virtual Profile* GetBrowserProfile() = 0; |
| 29 |
| 30 // Called when the download is complete. On success delegate should query |
| 31 // the downloader for values. |
| 32 virtual void OnDownloadComplete(ProfileDownloader* downloader, |
| 33 bool success) = 0; |
| 34 }; |
| 35 |
| 36 #endif // CHROME_BROWSER_PROFILES_PROFILE_DOWNLOADER_DELEGATE_H_ |
OLD | NEW |