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 #ifndef CHROME_BROWSER_UI_VIEWS_SELECT_FILE_DIALOG_EXTENSION_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_SELECT_FILE_DIALOG_EXTENSION_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_SELECT_FILE_DIALOG_EXTENSION_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_SELECT_FILE_DIALOG_EXTENSION_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "chrome/browser/ui/select_file_dialog.h" | |
13 #include "chrome/browser/ui/views/extensions/extension_dialog_observer.h" | 12 #include "chrome/browser/ui/views/extensions/extension_dialog_observer.h" |
| 13 #include "ui/base/dialogs/select_file_dialog.h" |
14 #include "ui/gfx/native_widget_types.h" // gfx::NativeWindow | 14 #include "ui/gfx/native_widget_types.h" // gfx::NativeWindow |
15 | 15 |
16 class ExtensionDialog; | 16 class ExtensionDialog; |
17 class Profile; | 17 class Profile; |
18 | 18 |
19 namespace content { | 19 namespace content { |
20 class RenderViewHost; | 20 class RenderViewHost; |
21 } | 21 } |
22 | 22 |
23 namespace ui { | 23 namespace ui { |
24 struct SelectedFileInfo; | 24 struct SelectedFileInfo; |
25 class SelectFilePolicy; | 25 class SelectFilePolicy; |
26 } | 26 } |
27 | 27 |
28 // Shows a dialog box for selecting a file or a folder, using the | 28 // Shows a dialog box for selecting a file or a folder, using the |
29 // file manager extension implementation. | 29 // file manager extension implementation. |
30 class SelectFileDialogExtension | 30 class SelectFileDialogExtension |
31 : public SelectFileDialog, | 31 : public ui::SelectFileDialog, |
32 public ExtensionDialogObserver { | 32 public ExtensionDialogObserver { |
33 public: | 33 public: |
34 static SelectFileDialogExtension* Create( | 34 static SelectFileDialogExtension* Create( |
35 SelectFileDialog::Listener* listener, | 35 ui::SelectFileDialog::Listener* listener, |
36 ui::SelectFilePolicy* policy); | 36 ui::SelectFilePolicy* policy); |
37 | 37 |
38 // BaseShellDialog implementation. | 38 // BaseShellDialog implementation. |
39 virtual bool IsRunning(gfx::NativeWindow owner_window) const OVERRIDE; | 39 virtual bool IsRunning(gfx::NativeWindow owner_window) const OVERRIDE; |
40 virtual void ListenerDestroyed() OVERRIDE; | 40 virtual void ListenerDestroyed() OVERRIDE; |
41 | 41 |
42 // ExtensionDialog::Observer implementation. | 42 // ExtensionDialog::Observer implementation. |
43 virtual void ExtensionDialogClosing(ExtensionDialog* dialog) OVERRIDE; | 43 virtual void ExtensionDialogClosing(ExtensionDialog* dialog) OVERRIDE; |
44 virtual void ExtensionTerminated(ExtensionDialog* dialog) OVERRIDE; | 44 virtual void ExtensionTerminated(ExtensionDialog* dialog) OVERRIDE; |
45 | 45 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 }; | 113 }; |
114 SelectionType selection_type_; | 114 SelectionType selection_type_; |
115 std::vector<ui::SelectedFileInfo> selection_files_; | 115 std::vector<ui::SelectedFileInfo> selection_files_; |
116 int selection_index_; | 116 int selection_index_; |
117 void* params_; | 117 void* params_; |
118 | 118 |
119 DISALLOW_COPY_AND_ASSIGN(SelectFileDialogExtension); | 119 DISALLOW_COPY_AND_ASSIGN(SelectFileDialogExtension); |
120 }; | 120 }; |
121 | 121 |
122 #endif // CHROME_BROWSER_UI_VIEWS_SELECT_FILE_DIALOG_EXTENSION_H_ | 122 #endif // CHROME_BROWSER_UI_VIEWS_SELECT_FILE_DIALOG_EXTENSION_H_ |
OLD | NEW |