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