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

Unified Diff: chrome/browser/extensions/api/runtime/runtime_api.h

Issue 206613005: Extract RuntimeEventRouter from extensions Runtime API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove from android whitelist (runtime-api) Created 6 years, 9 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/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 6e65e1b704cefa195cd1a124d3ae0757c42b0401..463fab0601036888a30c2bbc9c005de328a4718e 100644
--- a/chrome/browser/extensions/api/runtime/runtime_api.h
+++ b/chrome/browser/extensions/api/runtime/runtime_api.h
@@ -8,7 +8,6 @@
#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"
@@ -16,10 +15,6 @@
class Profile;
-namespace base {
-class Version;
-}
-
namespace content {
class BrowserContext;
}
@@ -53,6 +48,10 @@ class RuntimeAPI : public BrowserContextKeyedAPI,
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;
@@ -77,38 +76,6 @@ class RuntimeAPI : public BrowserContextKeyedAPI,
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 {
public:
DECLARE_EXTENSION_FUNCTION("runtime.getBackgroundPage",
« no previous file with comments | « chrome/browser/chromeos/app_mode/kiosk_app_update_service.cc ('k') | chrome/browser/extensions/api/runtime/runtime_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698