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

Unified Diff: chrome/browser/extensions/extensions_ui.h

Issue 265032: Reland: HTML Pack Extension Dialog / Linux & Mac Packaging Support (Closed)
Patch Set: blarg Created 11 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extensions_ui.h
diff --git a/chrome/browser/extensions/extensions_ui.h b/chrome/browser/extensions/extensions_ui.h
index 80ddf4db31bcbb7362b41e758179ad7d163ec784..908c9f3f1cf38a9705ae6634cdd8b3e097a97611 100644
--- a/chrome/browser/extensions/extensions_ui.h
+++ b/chrome/browser/extensions/extensions_ui.h
@@ -10,6 +10,7 @@
#include "chrome/browser/dom_ui/chrome_url_data_manager.h"
#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/extensions/pack_extension_job.h"
#include "chrome/browser/shell_dialogs.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
@@ -52,6 +53,7 @@ class ExtensionsUIHTMLSource : public ChromeURLDataManager::DataSource {
class ExtensionsDOMHandler
: public DOMMessageHandler,
public NotificationObserver,
+ public PackExtensionJob::Client,
public SelectFileDialog::Listener {
public:
explicit ExtensionsDOMHandler(ExtensionsService* extension_service);
@@ -71,13 +73,13 @@ class ExtensionsDOMHandler
const UserScript& script,
const FilePath& extension_path);
- private:
-#if defined(OS_WIN)
- // The implementation of this method is platform-specific and defined
- // elsewhere.
- static void ShowPackDialog();
-#endif
+ // ExtensionPackJob::Client
+ virtual void OnPackSuccess(const FilePath& crx_file,
+ const FilePath& key_file);
+
+ virtual void OnPackFailure(const std::wstring& message);
+ private:
// Callback for "requestExtensionsData" message.
void HandleRequestExtensionsData(const Value* value);
@@ -102,6 +104,12 @@ class ExtensionsDOMHandler
// Callback for "autoupdate" message.
void HandleAutoUpdateMessage(const Value* value);
+ // Utility for calling javascript window.alert in the page.
+ void ShowAlert(const std::string& message);
+
+ // Callback for "selectFilePath" message.
+ void HandleSelectFilePathMessage(const Value* value);
+
// SelectFileDialog::Listener
virtual void FileSelected(const FilePath& path,
int index, void* params);
@@ -126,6 +134,9 @@ class ExtensionsDOMHandler
// Used to pick the directory when loading an extension.
scoped_refptr<SelectFileDialog> load_extension_dialog_;
+ // Used to package the extension.
+ scoped_refptr<PackExtensionJob> pack_job_;
+
// We monitor changes to the extension system so that we can reload when
// necessary.
NotificationRegistrar registrar_;
« no previous file with comments | « chrome/browser/extensions/extensions_service_unittest.cc ('k') | chrome/browser/extensions/extensions_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698