| 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/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/wm/window_cycle_controller.h" | 10 #include "ash/wm/window_cycle_controller.h" |
| 11 #include "ash/wm/window_util.h" | 11 #include "ash/wm/window_util.h" |
| 12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
| 13 #include "base/files/file_enumerator.h" | 13 #include "base/files/file_enumerator.h" |
| 14 #include "base/json/json_writer.h" | 14 #include "base/json/json_writer.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/path_service.h" | 16 #include "base/path_service.h" |
| 17 #include "base/stringprintf.h" | |
| 18 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
| 18 #include "base/strings/stringprintf.h" |
| 19 #include "base/synchronization/cancellation_flag.h" | 19 #include "base/synchronization/cancellation_flag.h" |
| 20 #include "base/threading/sequenced_worker_pool.h" | 20 #include "base/threading/sequenced_worker_pool.h" |
| 21 #include "base/threading/worker_pool.h" | 21 #include "base/threading/worker_pool.h" |
| 22 #include "chrome/browser/browser_process.h" | 22 #include "chrome/browser/browser_process.h" |
| 23 #include "chrome/browser/chromeos/login/user.h" | 23 #include "chrome/browser/chromeos/login/user.h" |
| 24 #include "chrome/browser/chromeos/login/user_image.h" | 24 #include "chrome/browser/chromeos/login/user_image.h" |
| 25 #include "chrome/browser/chromeos/login/user_manager.h" | 25 #include "chrome/browser/chromeos/login/user_manager.h" |
| 26 #include "chrome/browser/chromeos/login/wallpaper_manager.h" | 26 #include "chrome/browser/chromeos/login/wallpaper_manager.h" |
| 27 #include "chrome/browser/extensions/event_router.h" | 27 #include "chrome/browser/extensions/event_router.h" |
| 28 #include "chrome/browser/image_decoder.h" | 28 #include "chrome/browser/image_decoder.h" |
| 29 #include "chrome/common/chrome_paths.h" | 29 #include "chrome/common/chrome_paths.h" |
| 30 #include "content/public/browser/browser_thread.h" | 30 #include "content/public/browser/browser_thread.h" |
| 31 #include "net/url_request/url_fetcher.h" | |
| 32 #include "net/url_request/url_fetcher_delegate.h" | |
| 33 #include "net/url_request/url_request_status.h" | |
| 34 #include "googleurl/src/gurl.h" | 31 #include "googleurl/src/gurl.h" |
| 35 #include "grit/app_locale_settings.h" | 32 #include "grit/app_locale_settings.h" |
| 36 #include "grit/generated_resources.h" | 33 #include "grit/generated_resources.h" |
| 37 #include "grit/platform_locale_settings.h" | 34 #include "grit/platform_locale_settings.h" |
| 35 #include "net/url_request/url_fetcher.h" |
| 36 #include "net/url_request/url_fetcher_delegate.h" |
| 37 #include "net/url_request/url_request_status.h" |
| 38 #include "ui/aura/window_observer.h" | 38 #include "ui/aura/window_observer.h" |
| 39 #include "ui/base/l10n/l10n_util.h" | 39 #include "ui/base/l10n/l10n_util.h" |
| 40 #include "ui/webui/web_ui_util.h" | 40 #include "ui/webui/web_ui_util.h" |
| 41 | 41 |
| 42 using base::BinaryValue; | 42 using base::BinaryValue; |
| 43 using content::BrowserThread; | 43 using content::BrowserThread; |
| 44 | 44 |
| 45 namespace { | 45 namespace { |
| 46 | 46 |
| 47 // Keeps in sync (same order) with WallpaperLayout enum in header file. | 47 // Keeps in sync (same order) with WallpaperLayout enum in header file. |
| (...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 919 this, file_list)); | 919 this, file_list)); |
| 920 } | 920 } |
| 921 | 921 |
| 922 void WallpaperPrivateGetOfflineWallpaperListFunction::OnComplete( | 922 void WallpaperPrivateGetOfflineWallpaperListFunction::OnComplete( |
| 923 const std::vector<std::string>& file_list) { | 923 const std::vector<std::string>& file_list) { |
| 924 ListValue* results = new ListValue(); | 924 ListValue* results = new ListValue(); |
| 925 results->AppendStrings(file_list); | 925 results->AppendStrings(file_list); |
| 926 SetResult(results); | 926 SetResult(results); |
| 927 SendResponse(true); | 927 SendResponse(true); |
| 928 } | 928 } |
| OLD | NEW |