OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <gdk/gdkx.h> | 5 #include <gdk/gdkx.h> |
6 #include <gtk/gtk.h> | 6 #include <gtk/gtk.h> |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/file_util.h" | 13 #include "base/file_util.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/message_loop.h" | 15 #include "base/message_loop.h" |
16 #include "base/mime_util.h" | 16 #include "base/mime_util.h" |
17 #include "base/process_util.h" | 17 #include "base/process_util.h" |
18 #include "base/string_number_conversions.h" | 18 #include "base/string_number_conversions.h" |
19 #include "base/string_util.h" | 19 #include "base/string_util.h" |
20 #include "base/sys_string_conversions.h" | 20 #include "base/sys_string_conversions.h" |
21 #include "base/threading/thread.h" | 21 #include "base/threading/thread.h" |
22 #include "base/threading/thread_restrictions.h" | 22 #include "base/threading/thread_restrictions.h" |
23 #include "base/utf_string_conversions.h" | 23 #include "base/utf_string_conversions.h" |
24 #include "chrome/browser/ui/gtk/dialogs_common.h" | 24 #include "chrome/browser/ui/gtk/dialogs_common.h" |
25 #include "chrome/browser/ui/shell_dialogs.h" | 25 #include "chrome/browser/ui/shell_dialogs.h" |
26 #include "content/public/browser/browser_thread.h" | 26 #include "content/public/browser/browser_thread.h" |
27 #include "grit/generated_resources.h" | 27 #include "grit/generated_resources.h" |
28 #include "ui/base/l10n/l10n_util.h" | 28 #include "ui/base/l10n/l10n_util.h" |
29 | 29 |
| 30 using content::BrowserThread; |
| 31 |
30 // Implementation of SelectFileDialog that shows a KDE common dialog for | 32 // Implementation of SelectFileDialog that shows a KDE common dialog for |
31 // choosing a file or folder. This acts as a modal dialog. | 33 // choosing a file or folder. This acts as a modal dialog. |
32 class SelectFileDialogImplKDE : public SelectFileDialogImpl { | 34 class SelectFileDialogImplKDE : public SelectFileDialogImpl { |
33 public: | 35 public: |
34 explicit SelectFileDialogImplKDE(Listener* listener); | 36 explicit SelectFileDialogImplKDE(Listener* listener); |
35 ~SelectFileDialogImplKDE(); | 37 ~SelectFileDialogImplKDE(); |
36 | 38 |
37 protected: | 39 protected: |
38 // SelectFileDialog implementation. | 40 // SelectFileDialog implementation. |
39 // |params| is user data we pass back via the Listener interface. | 41 // |params| is user data we pass back via the Listener interface. |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 filenames_fp.push_back(path); | 407 filenames_fp.push_back(path); |
406 } | 408 } |
407 | 409 |
408 if (filenames_fp.empty()) { | 410 if (filenames_fp.empty()) { |
409 FileNotSelected(params); | 411 FileNotSelected(params); |
410 return; | 412 return; |
411 } | 413 } |
412 MultiFilesSelected(filenames_fp, params); | 414 MultiFilesSelected(filenames_fp, params); |
413 } | 415 } |
414 | 416 |
OLD | NEW |