Index: chrome/browser/ui/webui/extensions/extension_loader_handler.h |
diff --git a/chrome/browser/ui/webui/extensions/extension_loader_handler.h b/chrome/browser/ui/webui/extensions/extension_loader_handler.h |
index 5d0351f97a0bfb200b2b64473ed49437a482393f..4b818f27d1063244bacbe95275d3fa2c39b25355 100644 |
--- a/chrome/browser/ui/webui/extensions/extension_loader_handler.h |
+++ b/chrome/browser/ui/webui/extensions/extension_loader_handler.h |
@@ -6,12 +6,15 @@ |
#define CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_LOADER_HANDLER_H_ |
#include <string> |
+#include <vector> |
#include "base/compiler_specific.h" |
#include "base/files/file_path.h" |
#include "base/macros.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/memory/weak_ptr.h" |
+#include "base/scoped_observer.h" |
+#include "chrome/browser/extensions/extension_error_reporter.h" |
#include "content/public/browser/web_ui_message_handler.h" |
namespace base { |
@@ -29,7 +32,8 @@ namespace extensions { |
class Extension; |
// The handler page for the Extension Commands UI overlay. |
-class ExtensionLoaderHandler : public content::WebUIMessageHandler { |
+class ExtensionLoaderHandler : public content::WebUIMessageHandler, |
+ public ExtensionErrorReporter::Observer { |
public: |
explicit ExtensionLoaderHandler(Profile* profile); |
virtual ~ExtensionLoaderHandler(); |
@@ -41,6 +45,12 @@ class ExtensionLoaderHandler : public content::WebUIMessageHandler { |
virtual void RegisterMessages() OVERRIDE; |
private: |
+ class FailureData; |
+ |
+ // Holds information about all unpacked extension install failures that |
+ // were reported while the extensions page was loading. |
+ std::vector<FailureData*> failures_; |
Devlin
2014/06/27 22:31:10
member variables at the bottom.
gpdavis
2014/06/28 02:31:18
Done.
|
+ |
class FileHelper; |
// Handle the 'extensionLoaderLoadUnpacked' message. |
@@ -49,11 +59,18 @@ class ExtensionLoaderHandler : public content::WebUIMessageHandler { |
// Handle the 'extensionLoaderRetry' message. |
void HandleRetry(const base::ListValue* args); |
+ // Handle the 'extensionLoaderSetDisplayLoading' message. |
+ void HandleSetDisplayLoading(const base::ListValue* args); |
+ |
+ // Handle the 'extensionLoaderDisplayFailures' message. |
+ void HandleDisplayFailures(const base::ListValue* args); |
+ |
// Try to load an unpacked extension from the given |file_path|. |
void LoadUnpackedExtensionImpl(const base::FilePath& file_path); |
// Called when an unpacked extension fails to load. |
Devlin
2014/06/27 22:31:10
This comment should be updated to be: "ExtensionEr
gpdavis
2014/06/28 02:31:18
Done.
|
- void OnLoadFailure(const base::FilePath& file_path, const std::string& error); |
+ virtual void OnLoadFailure(const base::FilePath& file_path, |
+ const std::string& error) OVERRIDE; |
// Notify the frontend of the failure. If it was a manifest error, |manifest| |
// will hold the manifest contents, and |line_number| will point to the line |
@@ -76,6 +93,11 @@ class ExtensionLoaderHandler : public content::WebUIMessageHandler { |
// Weak pointer factory for posting background tasks. |
base::WeakPtrFactory<ExtensionLoaderHandler> weak_ptr_factory_; |
+ ScopedObserver<ExtensionErrorReporter, ExtensionErrorReporter::Observer> |
+ extension_error_reporter_observer_; |
+ |
+ bool display_ready_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ExtensionLoaderHandler); |
}; |