OLD | NEW |
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 #include "chrome/browser/chromeos/extensions/wallpaper_private_api.h" | 5 #include "chrome/browser/chromeos/extensions/wallpaper_private_api.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
10 #include "ash/desktop_background/desktop_background_controller.h" | 10 #include "ash/desktop_background/desktop_background_controller.h" |
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 SendResponse(false); | 625 SendResponse(false); |
626 return false; | 626 return false; |
627 } | 627 } |
628 info.layout = wallpaper_api_util::GetLayoutEnum( | 628 info.layout = wallpaper_api_util::GetLayoutEnum( |
629 wallpaper_private::ToString(params->layout)); | 629 wallpaper_private::ToString(params->layout)); |
630 | 630 |
631 std::string email = chromeos::UserManager::Get()->GetActiveUser()->email(); | 631 std::string email = chromeos::UserManager::Get()->GetActiveUser()->email(); |
632 bool is_persistent = | 632 bool is_persistent = |
633 !chromeos::UserManager::Get()->IsCurrentUserNonCryptohomeDataEphemeral(); | 633 !chromeos::UserManager::Get()->IsCurrentUserNonCryptohomeDataEphemeral(); |
634 wallpaper_manager->SetUserWallpaperInfo(email, info, is_persistent); | 634 wallpaper_manager->SetUserWallpaperInfo(email, info, is_persistent); |
635 wallpaper_manager->UpdateWallpaper(); | 635 wallpaper_manager->UpdateWallpaper(false /* clear_cache */); |
636 SendResponse(true); | 636 SendResponse(true); |
637 | 637 |
638 // Gets email address while at UI thread. | 638 // Gets email address while at UI thread. |
639 return true; | 639 return true; |
640 } | 640 } |
641 | 641 |
642 WallpaperPrivateMinimizeInactiveWindowsFunction:: | 642 WallpaperPrivateMinimizeInactiveWindowsFunction:: |
643 WallpaperPrivateMinimizeInactiveWindowsFunction() { | 643 WallpaperPrivateMinimizeInactiveWindowsFunction() { |
644 } | 644 } |
645 | 645 |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
850 this, file_list)); | 850 this, file_list)); |
851 } | 851 } |
852 | 852 |
853 void WallpaperPrivateGetOfflineWallpaperListFunction::OnComplete( | 853 void WallpaperPrivateGetOfflineWallpaperListFunction::OnComplete( |
854 const std::vector<std::string>& file_list) { | 854 const std::vector<std::string>& file_list) { |
855 base::ListValue* results = new base::ListValue(); | 855 base::ListValue* results = new base::ListValue(); |
856 results->AppendStrings(file_list); | 856 results->AppendStrings(file_list); |
857 SetResult(results); | 857 SetResult(results); |
858 SendResponse(true); | 858 SendResponse(true); |
859 } | 859 } |
OLD | NEW |