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

Side by Side Diff: chrome/browser/ui/webui/options2/chromeos/set_wallpaper_options_handler.cc

Issue 10826084: Fixed SelectFile parameter for the Wallpaper chooser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/ui/webui/options2/chromeos/set_wallpaper_options_handle r.h" 5 #include "chrome/browser/ui/webui/options2/chromeos/set_wallpaper_options_handle r.h"
6 6
7 #include "ash/desktop_background/desktop_background_controller.h" 7 #include "ash/desktop_background/desktop_background_controller.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 16 matching lines...) Expand all
27 #include "ui/views/widget/widget.h" 27 #include "ui/views/widget/widget.h"
28 28
29 namespace chromeos { 29 namespace chromeos {
30 namespace options2 { 30 namespace options2 {
31 31
32 namespace { 32 namespace {
33 33
34 // Returns info about extensions for files we support as wallpaper images. 34 // Returns info about extensions for files we support as wallpaper images.
35 ui::SelectFileDialog::FileTypeInfo GetUserImageFileTypeInfo() { 35 ui::SelectFileDialog::FileTypeInfo GetUserImageFileTypeInfo() {
36 ui::SelectFileDialog::FileTypeInfo file_type_info; 36 ui::SelectFileDialog::FileTypeInfo file_type_info;
37 file_type_info.extensions.resize(3); 37 file_type_info.extensions.resize(1);
38 38
39 file_type_info.extensions[0].push_back(FILE_PATH_LITERAL("jpg")); 39 file_type_info.extensions[0].push_back(FILE_PATH_LITERAL("jpg"));
40 file_type_info.extensions[1].push_back(FILE_PATH_LITERAL("jpeg")); 40 file_type_info.extensions[0].push_back(FILE_PATH_LITERAL("jpeg"));
41 file_type_info.extensions[0].push_back(FILE_PATH_LITERAL("png"));
41 42
42 file_type_info.extensions[2].push_back(FILE_PATH_LITERAL("png")); 43 file_type_info.extension_description_overrides.resize(1);
44 file_type_info.extension_description_overrides[0] =
45 l10n_util::GetStringUTF16(IDS_IMAGE_FILES);
46
47 file_type_info.include_all_files = true;
43 48
44 return file_type_info; 49 return file_type_info;
45 } 50 }
46 51
47 } // namespace 52 } // namespace
48 53
49 SetWallpaperOptionsHandler::SetWallpaperOptionsHandler() 54 SetWallpaperOptionsHandler::SetWallpaperOptionsHandler()
50 : ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { 55 : ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
51 } 56 }
52 57
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 } 253 }
249 254
250 gfx::NativeWindow SetWallpaperOptionsHandler::GetBrowserWindow() const { 255 gfx::NativeWindow SetWallpaperOptionsHandler::GetBrowserWindow() const {
251 Browser* browser = 256 Browser* browser =
252 browser::FindBrowserWithWebContents(web_ui()->GetWebContents()); 257 browser::FindBrowserWithWebContents(web_ui()->GetWebContents());
253 return browser->window()->GetNativeWindow(); 258 return browser->window()->GetNativeWindow();
254 } 259 }
255 260
256 } // namespace options2 261 } // namespace options2
257 } // namespace chromeos 262 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698