Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Side by Side Diff: chrome/browser/extensions/api/developer_private/entry_picker.h

Issue 11794034: Adds functionality to pack an extension / app from the app. (Closed) Base URL: http://git.chromium.org/chromium/src.git@bacha_lo
Patch Set: . Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
(...skipping 11 matching lines...) Expand all
22 virtual void FileSelectionCanceled() = 0; 22 virtual void FileSelectionCanceled() = 0;
23 }; 23 };
24 24
25 // Handles showing a dialog to the user to ask for the directory name. 25 // Handles showing a dialog to the user to ask for the directory name.
26 class EntryPicker : public ui::SelectFileDialog::Listener { 26 class EntryPicker : public ui::SelectFileDialog::Listener {
27 public: 27 public:
28 EntryPicker(EntryPickerClient* client, 28 EntryPicker(EntryPickerClient* client,
29 content::WebContents* web_contents, 29 content::WebContents* web_contents,
30 ui::SelectFileDialog::Type picker_type, 30 ui::SelectFileDialog::Type picker_type,
31 const base::FilePath& last_directory, 31 const base::FilePath& last_directory,
32 const string16& select_title); 32 const string16& select_title,
33 const ui::SelectFileDialog::FileTypeInfo& info,
34 int file_type_index);
33 35
34 // Allow picker UI to be skipped in testing. 36 // Allow picker UI to be skipped in testing.
35 static void SkipPickerAndAlwaysSelectPathForTest(base::FilePath* path); 37 static void SkipPickerAndAlwaysSelectPathForTest(base::FilePath* path);
36 static void SkipPickerAndAlwaysCancelForTest(); 38 static void SkipPickerAndAlwaysCancelForTest();
37 static void StopSkippingPickerForTest(); 39 static void StopSkippingPickerForTest();
38 40
39 protected: 41 protected:
40 42
41 virtual ~EntryPicker(); 43 virtual ~EntryPicker();
42 44
43 private: 45 private:
44 // ui::SelectFileDialog::Listener implementation. 46 // ui::SelectFileDialog::Listener implementation.
45 virtual void FileSelected(const base::FilePath& path, 47 virtual void FileSelected(const base::FilePath& path,
46 int index, 48 int index,
47 void* params) OVERRIDE; 49 void* params) OVERRIDE;
48 50
49 virtual void FileSelectionCanceled(void* params) OVERRIDE; 51 virtual void FileSelectionCanceled(void* params) OVERRIDE;
50 52
51 scoped_refptr<ui::SelectFileDialog> select_file_dialog_; 53 scoped_refptr<ui::SelectFileDialog> select_file_dialog_;
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698