Chromium Code Reviews| 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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 279 dict->SetString("manifestBaseURL", kWallpaperManifestBaseURL); | 279 dict->SetString("manifestBaseURL", kWallpaperManifestBaseURL); |
| 280 #endif | 280 #endif |
| 281 | 281 |
| 282 Profile* profile = Profile::FromBrowserContext(browser_context()); | 282 Profile* profile = Profile::FromBrowserContext(browser_context()); |
| 283 std::string app_name( | 283 std::string app_name( |
| 284 profile->GetPrefs()->GetString(prefs::kCurrentWallpaperAppName)); | 284 profile->GetPrefs()->GetString(prefs::kCurrentWallpaperAppName)); |
| 285 if (!app_name.empty()) | 285 if (!app_name.empty()) |
| 286 dict->SetString("wallpaperAppName", app_name); | 286 dict->SetString("wallpaperAppName", app_name); |
| 287 | 287 |
| 288 dict->SetBoolean("isOEMDefaultWallpaper", IsOEMDefaultWallpaper()); | 288 dict->SetBoolean("isOEMDefaultWallpaper", IsOEMDefaultWallpaper()); |
| 289 dict->SetBoolean("isSyncCustomWallpaper", true); | |
|
bshe
2014/09/24 17:07:04
Set it to false initially. We want to hide this fe
Ran
2014/09/26 17:34:53
Done.
| |
| 289 dict->SetString("canceledWallpaper", | 290 dict->SetString("canceledWallpaper", |
| 290 wallpaper_api_util::kCancelWallpaperMessage); | 291 wallpaper_api_util::kCancelWallpaperMessage); |
| 291 return true; | 292 return true; |
| 292 } | 293 } |
| 293 | 294 |
| 294 WallpaperPrivateSetWallpaperIfExistsFunction:: | 295 WallpaperPrivateSetWallpaperIfExistsFunction:: |
| 295 WallpaperPrivateSetWallpaperIfExistsFunction() {} | 296 WallpaperPrivateSetWallpaperIfExistsFunction() {} |
| 296 | 297 |
| 297 WallpaperPrivateSetWallpaperIfExistsFunction:: | 298 WallpaperPrivateSetWallpaperIfExistsFunction:: |
| 298 ~WallpaperPrivateSetWallpaperIfExistsFunction() {} | 299 ~WallpaperPrivateSetWallpaperIfExistsFunction() {} |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 882 this, file_list)); | 883 this, file_list)); |
| 883 } | 884 } |
| 884 | 885 |
| 885 void WallpaperPrivateGetOfflineWallpaperListFunction::OnComplete( | 886 void WallpaperPrivateGetOfflineWallpaperListFunction::OnComplete( |
| 886 const std::vector<std::string>& file_list) { | 887 const std::vector<std::string>& file_list) { |
| 887 base::ListValue* results = new base::ListValue(); | 888 base::ListValue* results = new base::ListValue(); |
| 888 results->AppendStrings(file_list); | 889 results->AppendStrings(file_list); |
| 889 SetResult(results); | 890 SetResult(results); |
| 890 SendResponse(true); | 891 SendResponse(true); |
| 891 } | 892 } |
| OLD | NEW |