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

Side by Side Diff: chrome/browser/chromeos/arc/arc_wallpaper_handler.h

Issue 2175213002: arc: Do not keep track of in-flight decode requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_ARC_ARC_WALLPAPER_HANDLER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_WALLPAPER_HANDLER_H_
6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_WALLPAPER_HANDLER_H_ 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_WALLPAPER_HANDLER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 13 matching lines...) Expand all
24 ArcWallpaperHandler(); 24 ArcWallpaperHandler();
25 ~ArcWallpaperHandler() override; 25 ~ArcWallpaperHandler() override;
26 26
27 // SetWallpaperDelegate implementation. 27 // SetWallpaperDelegate implementation.
28 void SetWallpaper(const std::vector<uint8_t>& jpeg_data) override; 28 void SetWallpaper(const std::vector<uint8_t>& jpeg_data) override;
29 29
30 private: 30 private:
31 class ImageRequestImpl; 31 class ImageRequestImpl;
32 32
33 // Called from ImageRequestImpl on decode completion. 33 // Called from ImageRequestImpl on decode completion.
34 void OnImageDecoded(ImageRequestImpl* request, const SkBitmap& bitmap); 34 void OnImageDecoded(const SkBitmap& bitmap);
35 void OnDecodeImageFailed(ImageRequestImpl* request); 35 void OnDecodeImageFailed();
36 36
37 // The set of in-flight decode requests. 37 // Cancel the in-flight request if any.
38 std::set<std::unique_ptr<ImageRequestImpl>> inflight_requests_; 38 void CancelInflightRequest();
39
40 // The in-flight decode request.
41 std::unique_ptr<ImageRequestImpl> inflight_request_;
39 42
40 DISALLOW_COPY_AND_ASSIGN(ArcWallpaperHandler); 43 DISALLOW_COPY_AND_ASSIGN(ArcWallpaperHandler);
41 }; 44 };
42 45
43 } // namespace arc 46 } // namespace arc
44 47
45 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_WALLPAPER_HANDLER_H_ 48 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_WALLPAPER_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698