OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UI_WEBUI_OPTIONS2_CHROMEOS_WALLPAPER_THUMBNAIL_SOURCE_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS2_CHROMEOS_WALLPAPER_THUMBNAIL_SOURCE_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_CHROMEOS_WALLPAPER_THUMBNAIL_SOURCE_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_CHROMEOS_WALLPAPER_THUMBNAIL_SOURCE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" | 12 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
| 13 #include "ui/base/layout.h" |
13 | 14 |
14 namespace base { | 15 namespace base { |
15 class RefCountedBytes; | 16 class RefCountedBytes; |
16 } | 17 } |
17 | 18 |
18 namespace chromeos { | 19 namespace chromeos { |
19 | 20 |
20 class User; | 21 class User; |
21 | 22 |
22 namespace options2 { | 23 namespace options2 { |
(...skipping 20 matching lines...) Expand all Loading... |
43 virtual void StartDataRequest(const std::string& path, | 44 virtual void StartDataRequest(const std::string& path, |
44 bool is_incognito, | 45 bool is_incognito, |
45 int request_id) OVERRIDE; | 46 int request_id) OVERRIDE; |
46 | 47 |
47 private: | 48 private: |
48 class ThumbnailEncodingOperation; | 49 class ThumbnailEncodingOperation; |
49 | 50 |
50 virtual ~WallpaperThumbnailSource(); | 51 virtual ~WallpaperThumbnailSource(); |
51 | 52 |
52 void GetCurrentUserThumbnail(const std::string& path, | 53 void GetCurrentUserThumbnail(const std::string& path, |
| 54 ui::ScaleFactor scale_factor, |
53 int request_id); | 55 int request_id); |
54 | 56 |
55 void StartCustomThumbnailEncodingOperation(const chromeos::User* user, | 57 void StartCustomThumbnailEncodingOperation(const chromeos::User* user, |
| 58 ui::ScaleFactor scale_factor, |
56 int request_id); | 59 int request_id); |
57 | 60 |
58 void CancelPendingCustomThumbnailEncodingOperation(); | 61 void CancelPendingCustomThumbnailEncodingOperation(); |
59 | 62 |
60 void SendCurrentUserNullThumbnail(int request_id); | 63 void SendCurrentUserNullThumbnail(int request_id); |
61 | 64 |
62 void SendCurrentUserCustomThumbnail( | 65 void SendCurrentUserCustomThumbnail( |
63 scoped_refptr<base::RefCountedBytes> data, | 66 scoped_refptr<base::RefCountedBytes> data, |
64 int request_id); | 67 int request_id); |
65 | 68 |
66 void SendCurrentUserDefaultThumbnail(const std::string& path, | 69 void SendCurrentUserDefaultThumbnail(const std::string& path, |
| 70 ui::ScaleFactor scale_factor, |
67 int request_id); | 71 int request_id); |
68 | 72 |
69 scoped_refptr<ThumbnailEncodingOperation> thumbnail_encoding_op_; | 73 scoped_refptr<ThumbnailEncodingOperation> thumbnail_encoding_op_; |
70 | 74 |
71 base::WeakPtrFactory<WallpaperThumbnailSource> weak_ptr_factory_; | 75 base::WeakPtrFactory<WallpaperThumbnailSource> weak_ptr_factory_; |
72 | 76 |
73 DISALLOW_COPY_AND_ASSIGN(WallpaperThumbnailSource); | 77 DISALLOW_COPY_AND_ASSIGN(WallpaperThumbnailSource); |
74 }; | 78 }; |
75 | 79 |
76 } // namespace options2 | 80 } // namespace options2 |
77 } // namespace chromeos | 81 } // namespace chromeos |
78 | 82 |
79 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_CHROMEOS_WALLPAPER_THUMBNAIL_SOURCE_
H_ | 83 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_CHROMEOS_WALLPAPER_THUMBNAIL_SOURCE_
H_ |
OLD | NEW |