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

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

Issue 10750010: Add an installType property to the management API (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Forgot to remove param from LoadExtensionWithOptions (sorry) Created 8 years, 5 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/extension_management_api.h
diff --git a/chrome/browser/extensions/extension_management_api.h b/chrome/browser/extensions/extension_management_api.h
deleted file mode 100644
index a8c0927f9c7b0861b9e95506ee4b80c48c74df70..0000000000000000000000000000000000000000
--- a/chrome/browser/extensions/extension_management_api.h
+++ /dev/null
@@ -1,162 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_H__
-#define CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_H__
-
-#include "base/compiler_specific.h"
-#include "chrome/browser/extensions/extension_function.h"
-#include "chrome/browser/extensions/extension_install_prompt.h"
-#include "chrome/browser/extensions/extension_uninstall_dialog.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
-
-class ExtensionService;
-class ExtensionUninstallDialog;
-
-class ExtensionManagementFunction : public SyncExtensionFunction {
- protected:
- virtual ~ExtensionManagementFunction() {}
-
- ExtensionService* service();
-};
-
-class AsyncExtensionManagementFunction : public AsyncExtensionFunction {
- protected:
- virtual ~AsyncExtensionManagementFunction() {}
-
- ExtensionService* service();
-};
-
-class GetAllExtensionsFunction : public ExtensionManagementFunction {
- public:
- DECLARE_EXTENSION_FUNCTION_NAME("management.getAll");
-
- protected:
- virtual ~GetAllExtensionsFunction() {}
-
- // ExtensionFunction:
- virtual bool RunImpl() OVERRIDE;
-};
-
-class GetExtensionByIdFunction : public ExtensionManagementFunction {
- public:
- DECLARE_EXTENSION_FUNCTION_NAME("management.get");
-
- protected:
- virtual ~GetExtensionByIdFunction() {}
-
- // ExtensionFunction:
- virtual bool RunImpl() OVERRIDE;
-};
-
-class GetPermissionWarningsByIdFunction : public ExtensionManagementFunction {
- public:
- DECLARE_EXTENSION_FUNCTION_NAME("management.getPermissionWarningsById");
-
- protected:
- virtual ~GetPermissionWarningsByIdFunction() {}
-
- // ExtensionFunction:
- virtual bool RunImpl() OVERRIDE;
-};
-
-class GetPermissionWarningsByManifestFunction : public AsyncExtensionFunction {
- public:
- DECLARE_EXTENSION_FUNCTION_NAME(
- "management.getPermissionWarningsByManifest");
-
- // Called when utility process finishes.
- void OnParseSuccess(base::DictionaryValue* parsed_manifest);
- void OnParseFailure(const std::string& error);
-
- protected:
- virtual ~GetPermissionWarningsByManifestFunction() {}
-
- // ExtensionFunction:
- virtual bool RunImpl() OVERRIDE;
-};
-
-class LaunchAppFunction : public ExtensionManagementFunction {
- public:
- DECLARE_EXTENSION_FUNCTION_NAME("management.launchApp");
-
- protected:
- virtual ~LaunchAppFunction() {}
-
- // ExtensionFunction:
- virtual bool RunImpl() OVERRIDE;
-};
-
-class SetEnabledFunction : public AsyncExtensionManagementFunction,
- public ExtensionInstallPrompt::Delegate {
- public:
- DECLARE_EXTENSION_FUNCTION_NAME("management.setEnabled");
-
- SetEnabledFunction();
-
- protected:
- virtual ~SetEnabledFunction();
-
- // ExtensionFunction:
- virtual bool RunImpl() OVERRIDE;
-
- // ExtensionInstallPrompt::Delegate.
- virtual void InstallUIProceed() OVERRIDE;
- virtual void InstallUIAbort(bool user_initiated) OVERRIDE;
-
- private:
- std::string extension_id_;
-
- // Used for prompting to re-enable items with permissions escalation updates.
- scoped_ptr<ExtensionInstallPrompt> install_prompt_;
-};
-
-class UninstallFunction : public AsyncExtensionManagementFunction,
- public ExtensionUninstallDialog::Delegate {
- public:
- DECLARE_EXTENSION_FUNCTION_NAME("management.uninstall");
-
- UninstallFunction();
- static void SetAutoConfirmForTest(bool should_proceed);
-
- // ExtensionUninstallDialog::Delegate implementation.
- virtual void ExtensionUninstallAccepted() OVERRIDE;
- virtual void ExtensionUninstallCanceled() OVERRIDE;
-
- private:
- virtual ~UninstallFunction();
-
- virtual bool RunImpl() OVERRIDE;
-
- // If should_uninstall is true, this method does the actual uninstall.
- // If |show_uninstall_dialog|, then this function will be called by one of the
- // Accepted/Canceled callbacks. Otherwise, it's called directly from RunImpl.
- void Finish(bool should_uninstall);
-
- std::string extension_id_;
- scoped_ptr<ExtensionUninstallDialog> extension_uninstall_dialog_;
-};
-
-class ExtensionManagementEventRouter : public content::NotificationObserver {
- public:
- explicit ExtensionManagementEventRouter(Profile* profile);
- virtual ~ExtensionManagementEventRouter();
-
- void Init();
-
- private:
- // content::NotificationObserver implementation.
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
-
- content::NotificationRegistrar registrar_;
-
- Profile* profile_;
-
- DISALLOW_COPY_AND_ASSIGN(ExtensionManagementEventRouter);
-};
-
-#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_H__
« no previous file with comments | « chrome/browser/extensions/extension_function_registry.cc ('k') | chrome/browser/extensions/extension_management_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698