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 // This file implements commond select dialog functionality between GTK and KDE. | 5 // This file implements commond select dialog functionality between GTK and KDE. |
6 | 6 |
7 #ifndef CHROME_BROWSER_UI_GTK_DIALOGS_COMMON_H_ | 7 #ifndef CHROME_BROWSER_UI_GTK_DIALOGS_COMMON_H_ |
8 #define CHROME_BROWSER_UI_GTK_DIALOGS_COMMON_H_ | 8 #define CHROME_BROWSER_UI_GTK_DIALOGS_COMMON_H_ |
9 #pragma once | 9 #pragma once |
10 | 10 |
11 #include <set> | 11 #include <set> |
12 #include <string> | |
13 #include <vector> | |
14 | 12 |
| 13 #include "base/nix/xdg_util.h" |
15 #include "chrome/browser/ui/shell_dialogs.h" | 14 #include "chrome/browser/ui/shell_dialogs.h" |
16 | 15 |
17 // Shared implementation SelectFileDialog used by SelectFileDialogImplGTK | 16 // Shared implementation SelectFileDialog used by SelectFileDialogImplGTK |
18 class SelectFileDialogImpl : public SelectFileDialog { | 17 class SelectFileDialogImpl : public SelectFileDialog { |
19 public: | 18 public: |
20 // Factory method for creating a GTK-styled SelectFileDialogImpl | 19 // Factory method for creating a GTK-styled SelectFileDialogImpl |
21 static SelectFileDialogImpl* NewSelectFileDialogImplGTK(Listener* listener); | 20 static SelectFileDialogImpl* NewSelectFileDialogImplGTK(Listener* listener); |
22 // Factory method for creating a KDE-styled SelectFileDialogImpl | 21 // Factory method for creating a KDE-styled SelectFileDialogImpl |
23 static SelectFileDialogImpl* NewSelectFileDialogImplKDE(Listener* listener); | 22 static SelectFileDialogImpl* NewSelectFileDialogImplKDE( |
| 23 Listener* listener, |
| 24 base::nix::DesktopEnvironment desktop); |
24 | 25 |
25 // BaseShellDialog implementation. | 26 // BaseShellDialog implementation. |
26 virtual bool IsRunning(gfx::NativeWindow parent_window) const; | 27 virtual bool IsRunning(gfx::NativeWindow parent_window) const; |
27 virtual void ListenerDestroyed(); | 28 virtual void ListenerDestroyed(); |
28 | 29 |
29 protected: | 30 protected: |
30 explicit SelectFileDialogImpl(Listener* listener); | 31 explicit SelectFileDialogImpl(Listener* listener); |
31 virtual ~SelectFileDialogImpl(); | 32 virtual ~SelectFileDialogImpl(); |
32 | 33 |
33 // SelectFileDialog implementation. | 34 // SelectFileDialog implementation. |
(...skipping 28 matching lines...) Expand all Loading... |
62 | 63 |
63 // These two variables track where the user last saved a file or opened a | 64 // These two variables track where the user last saved a file or opened a |
64 // file so that we can display future dialogs with the same starting path. | 65 // file so that we can display future dialogs with the same starting path. |
65 static FilePath* last_saved_path_; | 66 static FilePath* last_saved_path_; |
66 static FilePath* last_opened_path_; | 67 static FilePath* last_opened_path_; |
67 | 68 |
68 DISALLOW_COPY_AND_ASSIGN(SelectFileDialogImpl); | 69 DISALLOW_COPY_AND_ASSIGN(SelectFileDialogImpl); |
69 }; | 70 }; |
70 | 71 |
71 #endif // CHROME_BROWSER_UI_GTK_DIALOGS_COMMON_H_ | 72 #endif // CHROME_BROWSER_UI_GTK_DIALOGS_COMMON_H_ |
72 | |
73 | |
OLD | NEW |