Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: chrome/browser/chromeos/extensions/wallpaper_api.h

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
(...skipping 25 matching lines...) Expand all
36 36
37 // AsyncExtensionFunction overrides. 37 // AsyncExtensionFunction overrides.
38 bool RunAsync() override; 38 bool RunAsync() override;
39 39
40 private: 40 private:
41 void OnWallpaperDecoded(const gfx::ImageSkia& image) override; 41 void OnWallpaperDecoded(const gfx::ImageSkia& image) override;
42 42
43 // Generates thumbnail of custom wallpaper. A simple STRETCH is used for 43 // Generates thumbnail of custom wallpaper. A simple STRETCH is used for
44 // generating thumbnail. 44 // generating thumbnail.
45 void GenerateThumbnail(const base::FilePath& thumbnail_path, 45 void GenerateThumbnail(const base::FilePath& thumbnail_path,
46 scoped_ptr<gfx::ImageSkia> image); 46 std::unique_ptr<gfx::ImageSkia> image);
47 47
48 // Thumbnail is ready. Calls api function javascript callback. 48 // Thumbnail is ready. Calls api function javascript callback.
49 void ThumbnailGenerated(base::RefCountedBytes* original_data, 49 void ThumbnailGenerated(base::RefCountedBytes* original_data,
50 base::RefCountedBytes* thumbnail_data); 50 base::RefCountedBytes* thumbnail_data);
51 51
52 // Called by OnURLFetchComplete(). 52 // Called by OnURLFetchComplete().
53 void OnWallpaperFetched(bool success, const std::string& response); 53 void OnWallpaperFetched(bool success, const std::string& response);
54 54
55 scoped_ptr<extensions::api::wallpaper::SetWallpaper::Params> params_; 55 std::unique_ptr<extensions::api::wallpaper::SetWallpaper::Params> params_;
56 56
57 // Unique file name of the custom wallpaper. 57 // Unique file name of the custom wallpaper.
58 std::string file_name_; 58 std::string file_name_;
59 59
60 // User id of the user who initiate this API call. 60 // User id of the user who initiate this API call.
61 AccountId account_id_ = EmptyAccountId(); 61 AccountId account_id_ = EmptyAccountId();
62 62
63 // Id used to identify user wallpaper files on hard drive. 63 // Id used to identify user wallpaper files on hard drive.
64 wallpaper::WallpaperFilesId wallpaper_files_id_; 64 wallpaper::WallpaperFilesId wallpaper_files_id_;
65 65
66 // Sequence token associated with wallpaper operations. Shared with 66 // Sequence token associated with wallpaper operations. Shared with
67 // WallpaperManager. 67 // WallpaperManager.
68 base::SequencedWorkerPool::SequenceToken sequence_token_; 68 base::SequencedWorkerPool::SequenceToken sequence_token_;
69 }; 69 };
70 70
71 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_WALLPAPER_API_H_ 71 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_WALLPAPER_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698