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 <set> | 5 #include <set> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 int file_type_index, | 55 int file_type_index, |
56 const base::FilePath::StringType& default_extension, | 56 const base::FilePath::StringType& default_extension, |
57 gfx::NativeWindow owning_window, | 57 gfx::NativeWindow owning_window, |
58 void* params) OVERRIDE; | 58 void* params) OVERRIDE; |
59 | 59 |
60 private: | 60 private: |
61 virtual bool HasMultipleFileTypeChoicesImpl() OVERRIDE; | 61 virtual bool HasMultipleFileTypeChoicesImpl() OVERRIDE; |
62 | 62 |
63 struct KDialogParams { | 63 struct KDialogParams { |
64 // This constructor can only be run from the UI thread. | 64 // This constructor can only be run from the UI thread. |
65 KDialogParams(const std::string& type, const std::string& title, | 65 KDialogParams(const std::string& type, |
66 const base::FilePath& default_path, gfx::NativeWindow parent, | 66 const std::string& title, |
67 bool file_operation, bool multiple_selection, | 67 const base::FilePath& default_path, |
| 68 gfx::NativeWindow parent, |
| 69 bool file_operation, |
| 70 bool multiple_selection, |
68 void* kdialog_params, | 71 void* kdialog_params, |
69 void (SelectFileDialogImplKDE::*callback)(const std::string&, | 72 void(SelectFileDialogImplKDE::* callback)(const std::string&, |
70 int, void*)) | 73 int, |
71 : type(type), title(title), default_path(default_path), parent(parent), | 74 void*)) |
| 75 : type(type), |
| 76 title(title), |
| 77 default_path(default_path), |
| 78 parent(parent), |
72 file_operation(file_operation), | 79 file_operation(file_operation), |
73 multiple_selection(multiple_selection), | 80 multiple_selection(multiple_selection), |
74 kdialog_params(kdialog_params), | 81 kdialog_params(kdialog_params), |
75 ui_loop_proxy(MessageLoopForUI::current()->message_loop_proxy()), | 82 ui_loop_proxy( |
76 callback(callback) { | 83 base::MessageLoopForUI::current()->message_loop_proxy()), |
77 } | 84 callback(callback) {} |
78 | 85 |
79 std::string type; | 86 std::string type; |
80 std::string title; | 87 std::string title; |
81 base::FilePath default_path; | 88 base::FilePath default_path; |
82 gfx::NativeWindow parent; | 89 gfx::NativeWindow parent; |
83 bool file_operation; | 90 bool file_operation; |
84 bool multiple_selection; | 91 bool multiple_selection; |
85 void* kdialog_params; | 92 void* kdialog_params; |
86 scoped_refptr<base::MessageLoopProxy> ui_loop_proxy; | 93 scoped_refptr<base::MessageLoopProxy> ui_loop_proxy; |
87 | 94 |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 // static | 472 // static |
466 SelectFileDialogImpl* SelectFileDialogImpl::NewSelectFileDialogImplKDE( | 473 SelectFileDialogImpl* SelectFileDialogImpl::NewSelectFileDialogImplKDE( |
467 Listener* listener, | 474 Listener* listener, |
468 ui::SelectFilePolicy* policy, | 475 ui::SelectFilePolicy* policy, |
469 base::nix::DesktopEnvironment desktop) { | 476 base::nix::DesktopEnvironment desktop) { |
470 return new SelectFileDialogImplKDE(listener, policy, desktop); | 477 return new SelectFileDialogImplKDE(listener, policy, desktop); |
471 } | 478 } |
472 | 479 |
473 } // namespace ui | 480 } // namespace ui |
474 | 481 |
OLD | NEW |