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 // This file implements common select dialog functionality between GTK and KDE. | 5 // This file implements common select dialog functionality between GTK and KDE. |
6 | 6 |
7 #ifndef CHROME_BROWSER_UI_LIBGTK2UI_SELECT_FILE_DIALOG_IMPL_H_ | 7 #ifndef CHROME_BROWSER_UI_LIBGTKUI_SELECT_FILE_DIALOG_IMPL_H_ |
8 #define CHROME_BROWSER_UI_LIBGTK2UI_SELECT_FILE_DIALOG_IMPL_H_ | 8 #define CHROME_BROWSER_UI_LIBGTKUI_SELECT_FILE_DIALOG_IMPL_H_ |
9 | 9 |
10 #include <stddef.h> | 10 #include <stddef.h> |
11 | 11 |
12 #include <set> | 12 #include <set> |
13 | 13 |
14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/nix/xdg_util.h" | 16 #include "base/nix/xdg_util.h" |
17 #include "ui/aura/window.h" | 17 #include "ui/aura/window.h" |
18 #include "ui/shell_dialogs/select_file_dialog.h" | 18 #include "ui/shell_dialogs/select_file_dialog.h" |
19 #include "ui/shell_dialogs/select_file_policy.h" | 19 #include "ui/shell_dialogs/select_file_policy.h" |
20 | 20 |
21 namespace libgtk2ui { | 21 namespace libgtkui { |
22 | 22 |
23 // Shared implementation SelectFileDialog used by SelectFileDialogImplGTK | 23 // Shared implementation SelectFileDialog used by SelectFileDialogImplGTK |
24 class SelectFileDialogImpl : public ui::SelectFileDialog { | 24 class SelectFileDialogImpl : public ui::SelectFileDialog { |
25 public: | 25 public: |
26 // Main factory method which returns correct type. | 26 // Main factory method which returns correct type. |
27 static ui::SelectFileDialog* Create(Listener* listener, | 27 static ui::SelectFileDialog* Create(Listener* listener, |
28 ui::SelectFilePolicy* policy); | 28 ui::SelectFilePolicy* policy); |
29 | 29 |
30 // Factory method for creating a GTK-styled SelectFileDialogImpl | 30 // Factory method for creating a GTK-styled SelectFileDialogImpl |
31 static SelectFileDialogImpl* NewSelectFileDialogImplGTK( | 31 static SelectFileDialogImpl* NewSelectFileDialogImplGTK( |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 Type type_; | 77 Type type_; |
78 | 78 |
79 // These two variables track where the user last saved a file or opened a | 79 // These two variables track where the user last saved a file or opened a |
80 // file so that we can display future dialogs with the same starting path. | 80 // file so that we can display future dialogs with the same starting path. |
81 static base::FilePath* last_saved_path_; | 81 static base::FilePath* last_saved_path_; |
82 static base::FilePath* last_opened_path_; | 82 static base::FilePath* last_opened_path_; |
83 | 83 |
84 DISALLOW_COPY_AND_ASSIGN(SelectFileDialogImpl); | 84 DISALLOW_COPY_AND_ASSIGN(SelectFileDialogImpl); |
85 }; | 85 }; |
86 | 86 |
87 } // namespace libgtk2ui | 87 } // namespace libgtkui |
88 | 88 |
89 #endif // CHROME_BROWSER_UI_LIBGTK2UI_SELECT_FILE_DIALOG_IMPL_H_ | 89 #endif // CHROME_BROWSER_UI_LIBGTKUI_SELECT_FILE_DIALOG_IMPL_H_ |
OLD | NEW |