| OLD | NEW |
| 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 <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 24 matching lines...) Expand all Loading... |
| 35 const char kKdialogBinary[] = "kdialog"; | 35 const char kKdialogBinary[] = "kdialog"; |
| 36 | 36 |
| 37 } // namespace | 37 } // namespace |
| 38 | 38 |
| 39 // Implementation of SelectFileDialog that shows a KDE common dialog for | 39 // Implementation of SelectFileDialog that shows a KDE common dialog for |
| 40 // choosing a file or folder. This acts as a modal dialog. | 40 // choosing a file or folder. This acts as a modal dialog. |
| 41 class SelectFileDialogImplKDE : public SelectFileDialogImpl { | 41 class SelectFileDialogImplKDE : public SelectFileDialogImpl { |
| 42 public: | 42 public: |
| 43 SelectFileDialogImplKDE(Listener* listener, | 43 SelectFileDialogImplKDE(Listener* listener, |
| 44 base::nix::DesktopEnvironment desktop); | 44 base::nix::DesktopEnvironment desktop); |
| 45 |
| 46 protected: |
| 45 virtual ~SelectFileDialogImplKDE(); | 47 virtual ~SelectFileDialogImplKDE(); |
| 46 | 48 |
| 47 protected: | |
| 48 // SelectFileDialog implementation. | 49 // SelectFileDialog implementation. |
| 49 // |params| is user data we pass back via the Listener interface. | 50 // |params| is user data we pass back via the Listener interface. |
| 50 virtual void SelectFileImpl(Type type, | 51 virtual void SelectFileImpl(Type type, |
| 51 const string16& title, | 52 const string16& title, |
| 52 const FilePath& default_path, | 53 const FilePath& default_path, |
| 53 const FileTypeInfo* file_types, | 54 const FileTypeInfo* file_types, |
| 54 int file_type_index, | 55 int file_type_index, |
| 55 const FilePath::StringType& default_extension, | 56 const FilePath::StringType& default_extension, |
| 56 gfx::NativeWindow owning_window, | 57 gfx::NativeWindow owning_window, |
| 57 void* params) OVERRIDE; | 58 void* params) OVERRIDE; |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 continue; | 452 continue; |
| 452 filenames_fp.push_back(path); | 453 filenames_fp.push_back(path); |
| 453 } | 454 } |
| 454 | 455 |
| 455 if (filenames_fp.empty()) { | 456 if (filenames_fp.empty()) { |
| 456 FileNotSelected(params); | 457 FileNotSelected(params); |
| 457 return; | 458 return; |
| 458 } | 459 } |
| 459 MultiFilesSelected(filenames_fp, params); | 460 MultiFilesSelected(filenames_fp, params); |
| 460 } | 461 } |
| OLD | NEW |