| Index: chrome/browser/extensions/api/runtime/runtime_api.h
|
| diff --git a/chrome/browser/extensions/api/runtime/runtime_api.h b/chrome/browser/extensions/api/runtime/runtime_api.h
|
| index 463fab0601036888a30c2bbc9c005de328a4718e..6e65e1b704cefa195cd1a124d3ae0757c42b0401 100644
|
| --- a/chrome/browser/extensions/api/runtime/runtime_api.h
|
| +++ b/chrome/browser/extensions/api/runtime/runtime_api.h
|
| @@ -8,12 +8,17 @@
|
| #include <string>
|
|
|
| #include "chrome/browser/extensions/chrome_extension_function.h"
|
| +#include "chrome/common/extensions/api/runtime.h"
|
| #include "content/public/browser/notification_observer.h"
|
| #include "content/public/browser/notification_registrar.h"
|
| #include "extensions/browser/browser_context_keyed_api_factory.h"
|
| #include "extensions/browser/update_observer.h"
|
|
|
| class Profile;
|
| +
|
| +namespace base {
|
| +class Version;
|
| +}
|
|
|
| namespace content {
|
| class BrowserContext;
|
| @@ -48,10 +53,6 @@
|
| void OnExtensionInstalled(const Extension* extension);
|
| void OnExtensionUninstalled(const Extension* extension);
|
|
|
| - // Shows the uninstall URL in a new tab.
|
| - static void ShowUninstallURL(Profile* profile,
|
| - const std::string& extension_id);
|
| -
|
| // BrowserContextKeyedAPI implementation:
|
| static const char* service_name() { return "RuntimeAPI"; }
|
| static const bool kServiceRedirectedInIncognito = true;
|
| @@ -74,6 +75,38 @@
|
| content::NotificationRegistrar registrar_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(RuntimeAPI);
|
| +};
|
| +
|
| +class RuntimeEventRouter {
|
| + public:
|
| + // Dispatches the onStartup event to all currently-loaded extensions.
|
| + static void DispatchOnStartupEvent(content::BrowserContext* context,
|
| + const std::string& extension_id);
|
| +
|
| + // Dispatches the onInstalled event to the given extension.
|
| + static void DispatchOnInstalledEvent(content::BrowserContext* context,
|
| + const std::string& extension_id,
|
| + const base::Version& old_version,
|
| + bool chrome_updated);
|
| +
|
| + // Dispatches the onUpdateAvailable event to the given extension.
|
| + static void DispatchOnUpdateAvailableEvent(
|
| + Profile* profile,
|
| + const std::string& extension_id,
|
| + const base::DictionaryValue* manifest);
|
| +
|
| + // Dispatches the onBrowserUpdateAvailable event to all extensions.
|
| + static void DispatchOnBrowserUpdateAvailableEvent(Profile* profile);
|
| +
|
| + // Dispatches the onRestartRequired event to the given app.
|
| + static void DispatchOnRestartRequiredEvent(
|
| + Profile* profile,
|
| + const std::string& app_id,
|
| + api::runtime::OnRestartRequired::Reason reason);
|
| +
|
| + // Does any work needed at extension uninstall (e.g. load uninstall url).
|
| + static void OnExtensionUninstalled(Profile* profile,
|
| + const std::string& extension_id);
|
| };
|
|
|
| class RuntimeGetBackgroundPageFunction : public ChromeAsyncExtensionFunction {
|
|
|