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" |
11 #include "ash/shell.h" | 11 #include "ash/shell.h" |
12 #include "ash/wm/mru_window_tracker.h" | 12 #include "ash/wm/mru_window_tracker.h" |
13 #include "ash/wm/window_state.h" | 13 #include "ash/wm/window_state.h" |
14 #include "ash/wm/window_util.h" | 14 #include "ash/wm/window_util.h" |
15 #include "base/command_line.h" | 15 #include "base/command_line.h" |
16 #include "base/file_util.h" | 16 #include "base/file_util.h" |
17 #include "base/files/file_enumerator.h" | 17 #include "base/files/file_enumerator.h" |
18 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
19 #include "base/path_service.h" | 19 #include "base/path_service.h" |
20 #include "base/prefs/pref_service.h" | 20 #include "base/prefs/pref_service.h" |
21 #include "base/strings/string_number_conversions.h" | 21 #include "base/strings/string_number_conversions.h" |
22 #include "base/strings/stringprintf.h" | 22 #include "base/strings/stringprintf.h" |
23 #include "base/threading/worker_pool.h" | 23 #include "base/threading/worker_pool.h" |
24 #include "chrome/browser/browser_process.h" | 24 #include "chrome/browser/browser_process.h" |
25 #include "chrome/browser/chromeos/login/users/user_manager.h" | 25 #include "chrome/browser/chromeos/login/users/user_manager.h" |
26 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" | 26 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" |
27 #include "chrome/browser/profiles/profile.h" | 27 #include "chrome/browser/profiles/profile.h" |
28 #include "chrome/common/chrome_paths.h" | 28 #include "chrome/common/chrome_paths.h" |
29 #include "chrome/common/pref_names.h" | 29 #include "chrome/common/pref_names.h" |
| 30 #include "chrome/grit/generated_resources.h" |
| 31 #include "chrome/grit/platform_locale_settings.h" |
30 #include "components/user_manager/user.h" | 32 #include "components/user_manager/user.h" |
31 #include "content/public/browser/browser_thread.h" | 33 #include "content/public/browser/browser_thread.h" |
32 #include "extensions/browser/event_router.h" | 34 #include "extensions/browser/event_router.h" |
33 #include "grit/app_locale_settings.h" | |
34 #include "grit/generated_resources.h" | |
35 #include "grit/platform_locale_settings.h" | |
36 #include "ui/base/l10n/l10n_util.h" | 35 #include "ui/base/l10n/l10n_util.h" |
37 #include "ui/base/webui/web_ui_util.h" | 36 #include "ui/base/webui/web_ui_util.h" |
| 37 #include "ui/strings/grit/app_locale_settings.h" |
38 #include "url/gurl.h" | 38 #include "url/gurl.h" |
39 | 39 |
40 using base::BinaryValue; | 40 using base::BinaryValue; |
41 using content::BrowserThread; | 41 using content::BrowserThread; |
42 namespace wallpaper_private = extensions::api::wallpaper_private; | 42 namespace wallpaper_private = extensions::api::wallpaper_private; |
43 namespace set_wallpaper_if_exists = wallpaper_private::SetWallpaperIfExists; | 43 namespace set_wallpaper_if_exists = wallpaper_private::SetWallpaperIfExists; |
44 namespace set_wallpaper = wallpaper_private::SetWallpaper; | 44 namespace set_wallpaper = wallpaper_private::SetWallpaper; |
45 namespace set_custom_wallpaper = wallpaper_private::SetCustomWallpaper; | 45 namespace set_custom_wallpaper = wallpaper_private::SetCustomWallpaper; |
46 namespace set_custom_wallpaper_layout = | 46 namespace set_custom_wallpaper_layout = |
47 wallpaper_private::SetCustomWallpaperLayout; | 47 wallpaper_private::SetCustomWallpaperLayout; |
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
877 this, file_list)); | 877 this, file_list)); |
878 } | 878 } |
879 | 879 |
880 void WallpaperPrivateGetOfflineWallpaperListFunction::OnComplete( | 880 void WallpaperPrivateGetOfflineWallpaperListFunction::OnComplete( |
881 const std::vector<std::string>& file_list) { | 881 const std::vector<std::string>& file_list) { |
882 base::ListValue* results = new base::ListValue(); | 882 base::ListValue* results = new base::ListValue(); |
883 results->AppendStrings(file_list); | 883 results->AppendStrings(file_list); |
884 SetResult(results); | 884 SetResult(results); |
885 SendResponse(true); | 885 SendResponse(true); |
886 } | 886 } |
OLD | NEW |