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 #include "chrome/browser/ui/webui/options2/chromeos/wallpaper_thumbnail_source.h
" | 5 #include "chrome/browser/ui/webui/options2/chromeos/wallpaper_thumbnail_source.h
" |
6 | 6 |
7 #include "ash/desktop_background/desktop_background_resources.h" | 7 #include "ash/desktop_background/desktop_background_resources.h" |
8 #include "base/memory/ref_counted_memory.h" | 8 #include "base/memory/ref_counted_memory.h" |
9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "chrome/browser/ui/webui/web_ui_util.h" | 21 #include "chrome/browser/ui/webui/web_ui_util.h" |
22 #include "chrome/common/url_constants.h" | 22 #include "chrome/common/url_constants.h" |
23 #include "content/public/browser/browser_thread.h" | 23 #include "content/public/browser/browser_thread.h" |
24 #include "grit/ui_resources.h" | 24 #include "grit/ui_resources.h" |
25 #include "net/base/mime_util.h" | 25 #include "net/base/mime_util.h" |
26 #include "ui/base/layout.h" | 26 #include "ui/base/layout.h" |
27 #include "ui/base/resource/resource_bundle.h" | 27 #include "ui/base/resource/resource_bundle.h" |
28 #include "ui/gfx/codec/png_codec.h" | 28 #include "ui/gfx/codec/png_codec.h" |
29 | 29 |
30 namespace chromeos { | 30 namespace chromeos { |
31 namespace options2 { | 31 namespace options { |
32 | 32 |
33 class WallpaperThumbnailSource::ThumbnailEncodingOperation | 33 class WallpaperThumbnailSource::ThumbnailEncodingOperation |
34 : public base::RefCountedThreadSafe< | 34 : public base::RefCountedThreadSafe< |
35 WallpaperThumbnailSource::ThumbnailEncodingOperation> { | 35 WallpaperThumbnailSource::ThumbnailEncodingOperation> { |
36 public: | 36 public: |
37 ThumbnailEncodingOperation(int request_id, | 37 ThumbnailEncodingOperation(int request_id, |
38 const chromeos::User* user, | 38 const chromeos::User* user, |
39 ui::ScaleFactor scale_factor, | 39 ui::ScaleFactor scale_factor, |
40 scoped_refptr<base::RefCountedBytes> data) | 40 scoped_refptr<base::RefCountedBytes> data) |
41 : request_id_(request_id), | 41 : request_id_(request_id), |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 int idr = PathToIDR(path); | 250 int idr = PathToIDR(path); |
251 if (idr == -1) { | 251 if (idr == -1) { |
252 SendResponse(request_id, NULL); | 252 SendResponse(request_id, NULL); |
253 return; | 253 return; |
254 } | 254 } |
255 const ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 255 const ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
256 SendResponse(request_id, | 256 SendResponse(request_id, |
257 rb.LoadDataResourceBytes(idr, scale_factor)); | 257 rb.LoadDataResourceBytes(idr, scale_factor)); |
258 } | 258 } |
259 | 259 |
260 } // namespace options2 | 260 } // namespace options |
261 } // namespace chromeos | 261 } // namespace chromeos |
OLD | NEW |