| 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_EXTENSIONS_API_DEVELOPER_PRIVATE_ENTRY_PICKER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_ENTRY_PICKER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_ENTRY_PICKER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_ENTRY_PICKER_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/extensions/extension_function.h" | 8 #include "chrome/browser/extensions/extension_function.h" |
| 9 #include "ui/shell_dialogs/select_file_dialog.h" | 9 #include "ui/shell_dialogs/select_file_dialog.h" |
| 10 | 10 |
| 11 namespace content { | 11 namespace content { |
| 12 class WebContents; | 12 class WebContents; |
| 13 } | 13 } |
| 14 | 14 |
| 15 namespace extensions { | 15 namespace extensions { |
| 16 | 16 |
| 17 namespace api { | 17 namespace api { |
| 18 | 18 |
| 19 class EntryPickerClient { | 19 class EntryPickerClient { |
| 20 public: | 20 public: |
| 21 virtual ~EntryPickerClient() { } |
| 22 |
| 21 virtual void FileSelected(const FilePath& path) = 0; | 23 virtual void FileSelected(const FilePath& path) = 0; |
| 22 virtual void FileSelectionCanceled() = 0; | 24 virtual void FileSelectionCanceled() = 0; |
| 23 }; | 25 }; |
| 24 | 26 |
| 25 // Handles showing a dialog to the user to ask for the directory name. | 27 // Handles showing a dialog to the user to ask for the directory name. |
| 26 class EntryPicker : public ui::SelectFileDialog::Listener { | 28 class EntryPicker : public ui::SelectFileDialog::Listener { |
| 27 public: | 29 public: |
| 28 EntryPicker(EntryPickerClient* client, | 30 EntryPicker(EntryPickerClient* client, |
| 29 content::WebContents* web_contents, | 31 content::WebContents* web_contents, |
| 30 ui::SelectFileDialog::Type picker_type, | 32 ui::SelectFileDialog::Type picker_type, |
| (...skipping 21 matching lines...) Expand all Loading... |
| 52 EntryPickerClient* client_; | 54 EntryPickerClient* client_; |
| 53 | 55 |
| 54 DISALLOW_COPY_AND_ASSIGN(EntryPicker); | 56 DISALLOW_COPY_AND_ASSIGN(EntryPicker); |
| 55 }; | 57 }; |
| 56 | 58 |
| 57 } // namespace api | 59 } // namespace api |
| 58 | 60 |
| 59 } // namespace extensions | 61 } // namespace extensions |
| 60 | 62 |
| 61 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_ENTRY_PICKER_H_ | 63 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_ENTRY_PICKER_H_ |
| OLD | NEW |