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 <X11/Xlib.h> | 7 #include <X11/Xlib.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 class SelectFileDialogImplKDE : public SelectFileDialogImpl { | 47 class SelectFileDialogImplKDE : public SelectFileDialogImpl { |
48 public: | 48 public: |
49 SelectFileDialogImplKDE(Listener* listener, | 49 SelectFileDialogImplKDE(Listener* listener, |
50 ui::SelectFilePolicy* policy, | 50 ui::SelectFilePolicy* policy, |
51 base::nix::DesktopEnvironment desktop); | 51 base::nix::DesktopEnvironment desktop); |
52 | 52 |
53 protected: | 53 protected: |
54 virtual ~SelectFileDialogImplKDE(); | 54 virtual ~SelectFileDialogImplKDE(); |
55 | 55 |
56 // BaseShellDialog implementation: | 56 // BaseShellDialog implementation: |
57 virtual bool IsRunning(gfx::NativeWindow parent_window) const OVERRIDE; | 57 virtual bool IsRunning(gfx::NativeWindow parent_window) const override; |
58 | 58 |
59 // SelectFileDialog implementation. | 59 // SelectFileDialog implementation. |
60 // |params| is user data we pass back via the Listener interface. | 60 // |params| is user data we pass back via the Listener interface. |
61 virtual void SelectFileImpl( | 61 virtual void SelectFileImpl( |
62 Type type, | 62 Type type, |
63 const base::string16& title, | 63 const base::string16& title, |
64 const base::FilePath& default_path, | 64 const base::FilePath& default_path, |
65 const FileTypeInfo* file_types, | 65 const FileTypeInfo* file_types, |
66 int file_type_index, | 66 int file_type_index, |
67 const base::FilePath::StringType& default_extension, | 67 const base::FilePath::StringType& default_extension, |
68 gfx::NativeWindow owning_window, | 68 gfx::NativeWindow owning_window, |
69 void* params) OVERRIDE; | 69 void* params) override; |
70 | 70 |
71 private: | 71 private: |
72 virtual bool HasMultipleFileTypeChoicesImpl() OVERRIDE; | 72 virtual bool HasMultipleFileTypeChoicesImpl() override; |
73 | 73 |
74 struct KDialogParams { | 74 struct KDialogParams { |
75 KDialogParams(const std::string& type, const std::string& title, | 75 KDialogParams(const std::string& type, const std::string& title, |
76 const base::FilePath& default_path, XID parent, | 76 const base::FilePath& default_path, XID parent, |
77 bool file_operation, bool multiple_selection, | 77 bool file_operation, bool multiple_selection, |
78 void* kdialog_params, | 78 void* kdialog_params, |
79 void (SelectFileDialogImplKDE::*callback)(XID, | 79 void (SelectFileDialogImplKDE::*callback)(XID, |
80 const std::string&, | 80 const std::string&, |
81 int, void*)) | 81 int, void*)) |
82 : type(type), title(title), default_path(default_path), parent(parent), | 82 : type(type), title(title), default_path(default_path), parent(parent), |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 } | 500 } |
501 | 501 |
502 if (filenames_fp.empty()) { | 502 if (filenames_fp.empty()) { |
503 FileNotSelected(params); | 503 FileNotSelected(params); |
504 return; | 504 return; |
505 } | 505 } |
506 MultiFilesSelected(filenames_fp, params); | 506 MultiFilesSelected(filenames_fp, params); |
507 } | 507 } |
508 | 508 |
509 } // namespace libgtk2ui | 509 } // namespace libgtk2ui |
OLD | NEW |