OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/wm/window_cycle_controller.h" | 10 #include "ash/wm/window_cycle_controller.h" |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 SET_STRING("connectionFailed", IDS_WALLPAPER_MANAGER_ACCESS_FAIL); | 200 SET_STRING("connectionFailed", IDS_WALLPAPER_MANAGER_ACCESS_FAIL); |
201 SET_STRING("downloadFailed", IDS_WALLPAPER_MANAGER_DOWNLOAD_FAIL); | 201 SET_STRING("downloadFailed", IDS_WALLPAPER_MANAGER_DOWNLOAD_FAIL); |
202 SET_STRING("downloadCanceled", IDS_WALLPAPER_MANAGER_DOWNLOAD_CANCEL); | 202 SET_STRING("downloadCanceled", IDS_WALLPAPER_MANAGER_DOWNLOAD_CANCEL); |
203 SET_STRING("customWallpaperWarning", | 203 SET_STRING("customWallpaperWarning", |
204 IDS_WALLPAPER_MANAGER_SHOW_CUSTOM_WALLPAPER_ON_START_WARNING); | 204 IDS_WALLPAPER_MANAGER_SHOW_CUSTOM_WALLPAPER_ON_START_WARNING); |
205 SET_STRING("accessFileFailure", IDS_WALLPAPER_MANAGER_ACCESS_FILE_FAILURE); | 205 SET_STRING("accessFileFailure", IDS_WALLPAPER_MANAGER_ACCESS_FILE_FAILURE); |
206 SET_STRING("invalidWallpaper", IDS_WALLPAPER_MANAGER_INVALID_WALLPAPER); | 206 SET_STRING("invalidWallpaper", IDS_WALLPAPER_MANAGER_INVALID_WALLPAPER); |
207 SET_STRING("learnMore", IDS_LEARN_MORE); | 207 SET_STRING("learnMore", IDS_LEARN_MORE); |
208 #undef SET_STRING | 208 #undef SET_STRING |
209 | 209 |
210 ChromeURLDataManager::DataSource::SetFontAndTextDirection(dict); | 210 URLDataSource::SetFontAndTextDirection(dict); |
211 | 211 |
212 chromeos::WallpaperManager* wallpaper_manager = | 212 chromeos::WallpaperManager* wallpaper_manager = |
213 chromeos::WallpaperManager::Get(); | 213 chromeos::WallpaperManager::Get(); |
214 chromeos::WallpaperInfo info; | 214 chromeos::WallpaperInfo info; |
215 | 215 |
216 if (wallpaper_manager->GetLoggedInUserWallpaperInfo(&info)) { | 216 if (wallpaper_manager->GetLoggedInUserWallpaperInfo(&info)) { |
217 if (info.type == chromeos::User::ONLINE) | 217 if (info.type == chromeos::User::ONLINE) |
218 dict->SetString("currentWallpaper", info.file); | 218 dict->SetString("currentWallpaper", info.file); |
219 else if (info.type == chromeos::User::CUSTOMIZED) | 219 else if (info.type == chromeos::User::CUSTOMIZED) |
220 dict->SetString("currentWallpaper", "CUSTOM"); | 220 dict->SetString("currentWallpaper", "CUSTOM"); |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 this, file_list)); | 691 this, file_list)); |
692 } | 692 } |
693 | 693 |
694 void WallpaperGetOfflineWallpaperListFunction::OnComplete( | 694 void WallpaperGetOfflineWallpaperListFunction::OnComplete( |
695 const std::vector<std::string>& file_list) { | 695 const std::vector<std::string>& file_list) { |
696 ListValue* results = new ListValue(); | 696 ListValue* results = new ListValue(); |
697 results->AppendStrings(file_list); | 697 results->AppendStrings(file_list); |
698 SetResult(results); | 698 SetResult(results); |
699 SendResponse(true); | 699 SendResponse(true); |
700 } | 700 } |
OLD | NEW |