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_FILE_SELECT_HELPER_H_ | 5 #ifndef CHROME_BROWSER_FILE_SELECT_HELPER_H_ |
6 #define CHROME_BROWSER_FILE_SELECT_HELPER_H_ | 6 #define CHROME_BROWSER_FILE_SELECT_HELPER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 class RenderViewHost; | 21 class RenderViewHost; |
22 class WebContents; | 22 class WebContents; |
23 struct FileChooserParams; | 23 struct FileChooserParams; |
24 } | 24 } |
25 | 25 |
26 namespace ui { | 26 namespace ui { |
27 struct SelectedFileInfo; | 27 struct SelectedFileInfo; |
28 } | 28 } |
29 | 29 |
30 // This class handles file-selection requests coming from WebUI elements | 30 // This class handles file-selection requests coming from WebUI elements |
31 // (via the ExtensionHost class). It implements both the initialisation | 31 // (via the extensions::ExtensionHost class). It implements both the |
32 // and listener functions for file-selection dialogs. | 32 // initialisation and listener functions for file-selection dialogs. |
33 class FileSelectHelper | 33 class FileSelectHelper |
34 : public base::RefCountedThreadSafe<FileSelectHelper>, | 34 : public base::RefCountedThreadSafe<FileSelectHelper>, |
35 public ui::SelectFileDialog::Listener, | 35 public ui::SelectFileDialog::Listener, |
36 public content::NotificationObserver { | 36 public content::NotificationObserver { |
37 public: | 37 public: |
38 | 38 |
39 // Show the file chooser dialog. | 39 // Show the file chooser dialog. |
40 static void RunFileChooser(content::WebContents* tab, | 40 static void RunFileChooser(content::WebContents* tab, |
41 const content::FileChooserParams& params); | 41 const content::FileChooserParams& params); |
42 | 42 |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 struct ActiveDirectoryEnumeration; | 158 struct ActiveDirectoryEnumeration; |
159 std::map<int, ActiveDirectoryEnumeration*> directory_enumerations_; | 159 std::map<int, ActiveDirectoryEnumeration*> directory_enumerations_; |
160 | 160 |
161 // Registrar for notifications regarding our RenderViewHost. | 161 // Registrar for notifications regarding our RenderViewHost. |
162 content::NotificationRegistrar notification_registrar_; | 162 content::NotificationRegistrar notification_registrar_; |
163 | 163 |
164 DISALLOW_COPY_AND_ASSIGN(FileSelectHelper); | 164 DISALLOW_COPY_AND_ASSIGN(FileSelectHelper); |
165 }; | 165 }; |
166 | 166 |
167 #endif // CHROME_BROWSER_FILE_SELECT_HELPER_H_ | 167 #endif // CHROME_BROWSER_FILE_SELECT_HELPER_H_ |
OLD | NEW |