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/desktop_background/desktop_background_controller.h" | 9 #include "ash/desktop_background/desktop_background_controller.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 SET_STRING("customWallpaperWarning", | 262 SET_STRING("customWallpaperWarning", |
263 IDS_WALLPAPER_MANAGER_SHOW_CUSTOM_WALLPAPER_ON_START_WARNING); | 263 IDS_WALLPAPER_MANAGER_SHOW_CUSTOM_WALLPAPER_ON_START_WARNING); |
264 SET_STRING("accessFileFailure", IDS_WALLPAPER_MANAGER_ACCESS_FILE_FAILURE); | 264 SET_STRING("accessFileFailure", IDS_WALLPAPER_MANAGER_ACCESS_FILE_FAILURE); |
265 SET_STRING("invalidWallpaper", IDS_WALLPAPER_MANAGER_INVALID_WALLPAPER); | 265 SET_STRING("invalidWallpaper", IDS_WALLPAPER_MANAGER_INVALID_WALLPAPER); |
266 SET_STRING("surpriseMeLabel", IDS_WALLPAPER_MANAGER_SURPRISE_ME_LABEL); | 266 SET_STRING("surpriseMeLabel", IDS_WALLPAPER_MANAGER_SURPRISE_ME_LABEL); |
267 SET_STRING("learnMore", IDS_LEARN_MORE); | 267 SET_STRING("learnMore", IDS_LEARN_MORE); |
268 SET_STRING("currentWallpaperSetByMessage", | 268 SET_STRING("currentWallpaperSetByMessage", |
269 IDS_CURRENT_WALLPAPER_SET_BY_MESSAGE); | 269 IDS_CURRENT_WALLPAPER_SET_BY_MESSAGE); |
270 #undef SET_STRING | 270 #undef SET_STRING |
271 | 271 |
272 webui::SetFontAndTextDirection(dict); | 272 webui::SetTextDirection(dict); |
273 | 273 |
274 chromeos::WallpaperManager* wallpaper_manager = | 274 chromeos::WallpaperManager* wallpaper_manager = |
275 chromeos::WallpaperManager::Get(); | 275 chromeos::WallpaperManager::Get(); |
276 wallpaper::WallpaperInfo info; | 276 wallpaper::WallpaperInfo info; |
277 | 277 |
278 if (wallpaper_manager->GetLoggedInUserWallpaperInfo(&info)) | 278 if (wallpaper_manager->GetLoggedInUserWallpaperInfo(&info)) |
279 dict->SetString("currentWallpaper", info.location); | 279 dict->SetString("currentWallpaper", info.location); |
280 | 280 |
281 #if defined(GOOGLE_CHROME_BUILD) | 281 #if defined(GOOGLE_CHROME_BUILD) |
282 dict->SetString("manifestBaseURL", kWallpaperManifestBaseURL); | 282 dict->SetString("manifestBaseURL", kWallpaperManifestBaseURL); |
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
894 this, file_list)); | 894 this, file_list)); |
895 } | 895 } |
896 | 896 |
897 void WallpaperPrivateGetOfflineWallpaperListFunction::OnComplete( | 897 void WallpaperPrivateGetOfflineWallpaperListFunction::OnComplete( |
898 const std::vector<std::string>& file_list) { | 898 const std::vector<std::string>& file_list) { |
899 base::ListValue* results = new base::ListValue(); | 899 base::ListValue* results = new base::ListValue(); |
900 results->AppendStrings(file_list); | 900 results->AppendStrings(file_list); |
901 SetResult(results); | 901 SetResult(results); |
902 SendResponse(true); | 902 SendResponse(true); |
903 } | 903 } |
OLD | NEW |