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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 user_id_hash_window_list_map_.begin(); | 226 user_id_hash_window_list_map_.begin(); |
227 iter != user_id_hash_window_list_map_.end(); | 227 iter != user_id_hash_window_list_map_.end(); |
228 ++iter) { | 228 ++iter) { |
229 iter->second.erase(window); | 229 iter->second.erase(window); |
230 } | 230 } |
231 } | 231 } |
232 | 232 |
233 } // namespace | 233 } // namespace |
234 | 234 |
235 bool WallpaperPrivateGetStringsFunction::RunImpl() { | 235 bool WallpaperPrivateGetStringsFunction::RunImpl() { |
236 DictionaryValue* dict = new DictionaryValue(); | 236 base::DictionaryValue* dict = new base::DictionaryValue(); |
237 SetResult(dict); | 237 SetResult(dict); |
238 | 238 |
239 #define SET_STRING(id, idr) \ | 239 #define SET_STRING(id, idr) \ |
240 dict->SetString(id, l10n_util::GetStringUTF16(idr)) | 240 dict->SetString(id, l10n_util::GetStringUTF16(idr)) |
241 SET_STRING("webFontFamily", IDS_WEB_FONT_FAMILY); | 241 SET_STRING("webFontFamily", IDS_WEB_FONT_FAMILY); |
242 SET_STRING("webFontSize", IDS_WEB_FONT_SIZE); | 242 SET_STRING("webFontSize", IDS_WEB_FONT_SIZE); |
243 SET_STRING("allCategoryLabel", IDS_WALLPAPER_MANAGER_ALL_CATEGORY_LABEL); | 243 SET_STRING("allCategoryLabel", IDS_WALLPAPER_MANAGER_ALL_CATEGORY_LABEL); |
244 SET_STRING("deleteCommandLabel", IDS_WALLPAPER_MANAGER_DELETE_COMMAND_LABEL); | 244 SET_STRING("deleteCommandLabel", IDS_WALLPAPER_MANAGER_DELETE_COMMAND_LABEL); |
245 SET_STRING("customCategoryLabel", | 245 SET_STRING("customCategoryLabel", |
246 IDS_WALLPAPER_MANAGER_CUSTOM_CATEGORY_LABEL); | 246 IDS_WALLPAPER_MANAGER_CUSTOM_CATEGORY_LABEL); |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 } | 835 } |
836 } | 836 } |
837 BrowserThread::PostTask( | 837 BrowserThread::PostTask( |
838 BrowserThread::UI, FROM_HERE, | 838 BrowserThread::UI, FROM_HERE, |
839 base::Bind(&WallpaperPrivateGetOfflineWallpaperListFunction::OnComplete, | 839 base::Bind(&WallpaperPrivateGetOfflineWallpaperListFunction::OnComplete, |
840 this, file_list)); | 840 this, file_list)); |
841 } | 841 } |
842 | 842 |
843 void WallpaperPrivateGetOfflineWallpaperListFunction::OnComplete( | 843 void WallpaperPrivateGetOfflineWallpaperListFunction::OnComplete( |
844 const std::vector<std::string>& file_list) { | 844 const std::vector<std::string>& file_list) { |
845 ListValue* results = new ListValue(); | 845 base::ListValue* results = new base::ListValue(); |
846 results->AppendStrings(file_list); | 846 results->AppendStrings(file_list); |
847 SetResult(results); | 847 SetResult(results); |
848 SendResponse(true); | 848 SendResponse(true); |
849 } | 849 } |
OLD | NEW |