| Index: chrome/browser/ui/webui/extensions/pack_extension_handler.h
|
| diff --git a/chrome/browser/ui/webui/extensions/pack_extension_handler.h b/chrome/browser/ui/webui/extensions/pack_extension_handler.h
|
| index 47d618a593de8037b32d8ddc28c63dd7e3133bee..403857196694c878e0abbc75d7fe947fd2569ddf 100644
|
| --- a/chrome/browser/ui/webui/extensions/pack_extension_handler.h
|
| +++ b/chrome/browser/ui/webui/extensions/pack_extension_handler.h
|
| @@ -11,10 +11,12 @@
|
| #include "chrome/browser/browsing_data_remover.h"
|
| #include "chrome/browser/extensions/pack_extension_job.h"
|
| #include "chrome/browser/plugin_data_remover_helper.h"
|
| +#include "chrome/browser/ui/select_file_dialog.h"
|
| #include "content/public/browser/web_ui_message_handler.h"
|
|
|
| // Clear browser data handler page UI handler.
|
| class PackExtensionHandler : public content::WebUIMessageHandler,
|
| + public SelectFileDialog::Listener,
|
| public PackExtensionJob::Client {
|
| public:
|
| PackExtensionHandler();
|
| @@ -25,7 +27,7 @@ class PackExtensionHandler : public content::WebUIMessageHandler,
|
| // WebUIMessageHandler implementation.
|
| virtual void RegisterMessages() OVERRIDE;
|
|
|
| - // ExtensionPackJob::Client
|
| + // ExtensionPackJob::Client implementation.
|
| virtual void OnPackSuccess(const FilePath& crx_file,
|
| const FilePath& key_file) OVERRIDE;
|
|
|
| @@ -33,15 +35,33 @@ class PackExtensionHandler : public content::WebUIMessageHandler,
|
| ExtensionCreator::ErrorType) OVERRIDE;
|
|
|
| private:
|
| - // Javascript callback to start packing an extension.
|
| + // SelectFileDialog::Listener implementation.
|
| + virtual void FileSelected(const FilePath& path,
|
| + int index, void* params) OVERRIDE;
|
| + virtual void MultiFilesSelected(
|
| + const std::vector<FilePath>& files, void* params) OVERRIDE;
|
| + virtual void FileSelectionCanceled(void* params) OVERRIDE {}
|
| +
|
| + // JavaScript callback to start packing an extension.
|
| void HandlePackMessage(const ListValue* args);
|
|
|
| - // A function to ask the webpage to show an alert.
|
| + // JavaScript callback to show a file browse dialog.
|
| + // |args[0]| must be a string that specifies the file dialog type: file or
|
| + // folder.
|
| + // |args[1]| must be a string that specifies the operation to perform: load
|
| + // or pem.
|
| + void HandleSelectFilePathMessage(const ListValue* args);
|
| +
|
| + // A function to ask the page to show an alert.
|
| void ShowAlert(const std::string& message);
|
|
|
| // Used to package the extension.
|
| scoped_refptr<PackExtensionJob> pack_job_;
|
|
|
| + // Returned by the SelectFileDialog machinery. Used to initiate the selection
|
| + // dialog.
|
| + scoped_refptr<SelectFileDialog> load_extension_dialog_;
|
| +
|
| // Path to root directory of extension
|
| std::string extension_path_;
|
|
|
|
|