| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CHROMEOS_EXTENSIONS_WALLPAPER_API_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_WALLPAPER_API_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_WALLPAPER_API_H_ | 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_WALLPAPER_API_H_ |
| 7 | 7 |
| 8 #include "base/threading/sequenced_worker_pool.h" | 8 #include "base/threading/sequenced_worker_pool.h" |
| 9 #include "chrome/browser/chromeos/extensions/wallpaper_function_base.h" | 9 #include "chrome/browser/chromeos/extensions/wallpaper_function_base.h" |
| 10 #include "chrome/common/extensions/api/wallpaper.h" | 10 #include "chrome/common/extensions/api/wallpaper.h" |
| 11 #include "components/signin/core/account_id/account_id.h" | 11 #include "components/signin/core/account_id/account_id.h" |
| 12 #include "net/url_request/url_request_status.h" | 12 #include "net/url_request/url_request_status.h" |
| 13 | 13 |
| 14 namespace base { |
| 15 class RefCountedBytes; |
| 16 } |
| 17 |
| 14 // Implementation of chrome.wallpaper.setWallpaper API. | 18 // Implementation of chrome.wallpaper.setWallpaper API. |
| 15 // After this API being called, a jpeg encoded wallpaper will be saved to | 19 // After this API being called, a jpeg encoded wallpaper will be saved to |
| 16 // /home/chronos/custom_wallpaper/{resolution}/{user_id_hash}/file_name. The | 20 // /home/chronos/custom_wallpaper/{resolution}/{user_id_hash}/file_name. The |
| 17 // wallpaper can then persistent after Chrome restart. New call to this API | 21 // wallpaper can then persistent after Chrome restart. New call to this API |
| 18 // will replace the previous saved wallpaper with new one. | 22 // will replace the previous saved wallpaper with new one. |
| 19 // Note: For security reason, the original encoded wallpaper image is not saved | 23 // Note: For security reason, the original encoded wallpaper image is not saved |
| 20 // directly. It is decoded and re-encoded to jpeg format before saved to file | 24 // directly. It is decoded and re-encoded to jpeg format before saved to file |
| 21 // system. | 25 // system. |
| 22 class WallpaperSetWallpaperFunction : public WallpaperFunctionBase { | 26 class WallpaperSetWallpaperFunction : public WallpaperFunctionBase { |
| 23 public: | 27 public: |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 61 |
| 58 // User id hash of the logged in user. | 62 // User id hash of the logged in user. |
| 59 std::string user_id_hash_; | 63 std::string user_id_hash_; |
| 60 | 64 |
| 61 // Sequence token associated with wallpaper operations. Shared with | 65 // Sequence token associated with wallpaper operations. Shared with |
| 62 // WallpaperManager. | 66 // WallpaperManager. |
| 63 base::SequencedWorkerPool::SequenceToken sequence_token_; | 67 base::SequencedWorkerPool::SequenceToken sequence_token_; |
| 64 }; | 68 }; |
| 65 | 69 |
| 66 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_WALLPAPER_API_H_ | 70 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_WALLPAPER_API_H_ |
| 67 | |
| OLD | NEW |