Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: chrome/browser/chromeos/extensions/wallpaper_private_api.cc

Issue 880313002: webui: add [lang] attribute to <html> element on all webui pages so (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cros Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 SET_STRING("customWallpaperWarning", 269 SET_STRING("customWallpaperWarning",
270 IDS_WALLPAPER_MANAGER_SHOW_CUSTOM_WALLPAPER_ON_START_WARNING); 270 IDS_WALLPAPER_MANAGER_SHOW_CUSTOM_WALLPAPER_ON_START_WARNING);
271 SET_STRING("accessFileFailure", IDS_WALLPAPER_MANAGER_ACCESS_FILE_FAILURE); 271 SET_STRING("accessFileFailure", IDS_WALLPAPER_MANAGER_ACCESS_FILE_FAILURE);
272 SET_STRING("invalidWallpaper", IDS_WALLPAPER_MANAGER_INVALID_WALLPAPER); 272 SET_STRING("invalidWallpaper", IDS_WALLPAPER_MANAGER_INVALID_WALLPAPER);
273 SET_STRING("surpriseMeLabel", IDS_WALLPAPER_MANAGER_SURPRISE_ME_LABEL); 273 SET_STRING("surpriseMeLabel", IDS_WALLPAPER_MANAGER_SURPRISE_ME_LABEL);
274 SET_STRING("learnMore", IDS_LEARN_MORE); 274 SET_STRING("learnMore", IDS_LEARN_MORE);
275 SET_STRING("currentWallpaperSetByMessage", 275 SET_STRING("currentWallpaperSetByMessage",
276 IDS_CURRENT_WALLPAPER_SET_BY_MESSAGE); 276 IDS_CURRENT_WALLPAPER_SET_BY_MESSAGE);
277 #undef SET_STRING 277 #undef SET_STRING
278 278
279 webui::SetFontAndTextDirection(dict); 279 const std::string& app_locale = g_browser_process->GetApplicationLocale();
280 webui::SetLoadTimeDataDefaults(app_locale, dict);
280 281
281 chromeos::WallpaperManager* wallpaper_manager = 282 chromeos::WallpaperManager* wallpaper_manager =
282 chromeos::WallpaperManager::Get(); 283 chromeos::WallpaperManager::Get();
283 wallpaper::WallpaperInfo info; 284 wallpaper::WallpaperInfo info;
284 285
285 if (wallpaper_manager->GetLoggedInUserWallpaperInfo(&info)) 286 if (wallpaper_manager->GetLoggedInUserWallpaperInfo(&info))
286 dict->SetString("currentWallpaper", info.location); 287 dict->SetString("currentWallpaper", info.location);
287 288
288 #if defined(GOOGLE_CHROME_BUILD) 289 #if defined(GOOGLE_CHROME_BUILD)
289 dict->SetString("manifestBaseURL", kWallpaperManifestBaseURL); 290 dict->SetString("manifestBaseURL", kWallpaperManifestBaseURL);
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 this, file_list)); 900 this, file_list));
900 } 901 }
901 902
902 void WallpaperPrivateGetOfflineWallpaperListFunction::OnComplete( 903 void WallpaperPrivateGetOfflineWallpaperListFunction::OnComplete(
903 const std::vector<std::string>& file_list) { 904 const std::vector<std::string>& file_list) {
904 base::ListValue* results = new base::ListValue(); 905 base::ListValue* results = new base::ListValue();
905 results->AppendStrings(file_list); 906 results->AppendStrings(file_list);
906 SetResult(results); 907 SetResult(results);
907 SendResponse(true); 908 SendResponse(true);
908 } 909 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698