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

Side by Side Diff: ash/test/test_user_wallpaper_delegate.cc

Issue 2271373002: mash: Port mojo:ash_sysui's ContextMenuMus to mojo:ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 3 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
« no previous file with comments | « ash/test/test_user_wallpaper_delegate.h ('k') | ash/test/test_wallpaper_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ash/test/test_user_wallpaper_delegate.h"
6
7 #include "ash/desktop_background/desktop_background_controller.h"
8 #include "ash/shell.h"
9
10 namespace ash {
11 namespace test {
12
13 TestUserWallpaperDelegate::TestUserWallpaperDelegate()
14 : update_wallpaper_count_(0) {}
15
16 TestUserWallpaperDelegate::~TestUserWallpaperDelegate() {}
17
18 void TestUserWallpaperDelegate::UpdateWallpaper(bool clear_cache) {
19 DefaultUserWallpaperDelegate::UpdateWallpaper(clear_cache);
20 if (!custom_wallpaper_.isNull()) {
21 Shell::GetInstance()->desktop_background_controller()->SetWallpaperImage(
22 custom_wallpaper_, wallpaper::WALLPAPER_LAYOUT_STRETCH);
23 }
24 update_wallpaper_count_++;
25 }
26
27 int TestUserWallpaperDelegate::GetUpdateWallpaperCountAndReset() {
28 int count = update_wallpaper_count_;
29 update_wallpaper_count_ = 0;
30 return count;
31 }
32
33 } // namespace test
34 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/test_user_wallpaper_delegate.h ('k') | ash/test/test_wallpaper_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698