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

Side by Side Diff: ash/desktop_background/wallpaper_resizer.h

Issue 236013002: Apply default wallpaper from customization manifest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove wallpaper URL from ServicesCustomizationDocumentTest. Created 6 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 ASH_DESKTOP_BACKGROUND_DESKTOP_WALLPAPER_RESIZER_H_ 5 #ifndef ASH_DESKTOP_BACKGROUND_DESKTOP_WALLPAPER_RESIZER_H_
6 #define ASH_DESKTOP_BACKGROUND_DESKTOP_WALLPAPER_RESIZER_H_ 6 #define ASH_DESKTOP_BACKGROUND_DESKTOP_WALLPAPER_RESIZER_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/desktop_background/desktop_background_controller.h" 9 #include "ash/desktop_background/desktop_background_controller.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "base/observer_list.h" 11 #include "base/observer_list.h"
12 #include "skia/ext/image_operations.h" 12 #include "skia/ext/image_operations.h"
13 #include "third_party/skia/include/core/SkBitmap.h" 13 #include "third_party/skia/include/core/SkBitmap.h"
14 #include "ui/gfx/image/image_skia.h" 14 #include "ui/gfx/image/image_skia.h"
15 #include "ui/gfx/size.h" 15 #include "ui/gfx/size.h"
16 16
17 namespace ash { 17 namespace ash {
18 18
19 class WallpaperResizerObserver; 19 class WallpaperResizerObserver;
20 20
21 extern const int kInvalidResourceID;
22
23 // Stores the current wallpaper data and resize it to |target_size| if needed. 21 // Stores the current wallpaper data and resize it to |target_size| if needed.
24 class ASH_EXPORT WallpaperResizer { 22 class ASH_EXPORT WallpaperResizer {
25 public: 23 public:
26 // Returns a unique identifier corresponding to |image|, suitable for 24 // Returns a unique identifier corresponding to |image|, suitable for
27 // comparison against the value returned by original_image_id(). If the image 25 // comparison against the value returned by original_image_id(). If the image
28 // is modified, its ID will change. 26 // is modified, its ID will change.
29 static uint32_t GetImageId(const gfx::ImageSkia& image); 27 static uint32_t GetImageId(const gfx::ImageSkia& image);
30 28
31 WallpaperResizer(int image_resource_id, 29 WallpaperResizer(int image_resource_id,
32 const gfx::Size& target_size, 30 const gfx::Size& target_size,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 74
77 base::WeakPtrFactory<WallpaperResizer> weak_ptr_factory_; 75 base::WeakPtrFactory<WallpaperResizer> weak_ptr_factory_;
78 76
79 DISALLOW_COPY_AND_ASSIGN(WallpaperResizer); 77 DISALLOW_COPY_AND_ASSIGN(WallpaperResizer);
80 }; 78 };
81 79
82 } // namespace ash 80 } // namespace ash
83 81
84 82
85 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_WALLPAPER_RESIZER_H_ 83 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_WALLPAPER_RESIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698