| Index: chrome/browser/extensions/extension_permissions_api.h
|
| diff --git a/chrome/browser/extensions/extension_permissions_api.h b/chrome/browser/extensions/extension_permissions_api.h
|
| index 583302e11e003631ce45043bd69acb84dee554aa..effa7e975f42399fc5e4f05dedc1bcdf5c09ccee 100644
|
| --- a/chrome/browser/extensions/extension_permissions_api.h
|
| +++ b/chrome/browser/extensions/extension_permissions_api.h
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// 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.
|
|
|
| @@ -12,53 +12,11 @@
|
| #include "chrome/browser/extensions/extension_function.h"
|
| #include "chrome/browser/extensions/extension_install_ui.h"
|
| #include "chrome/common/extensions/extension_permission_set.h"
|
| -#include "chrome/common/chrome_notification_types.h"
|
| -#include "content/public/browser/render_process_host.h"
|
|
|
| class Extension;
|
| class ExtensionPermissionSet;
|
| class ExtensionService;
|
|
|
| -class ExtensionPermissionsManager {
|
| - public:
|
| - explicit ExtensionPermissionsManager(ExtensionService* extension_service);
|
| - ~ExtensionPermissionsManager();
|
| -
|
| - // Adds the set of |permissions| to the |extension|'s active permission set
|
| - // and sends the relevant messages and notifications. This method assumes the
|
| - // user has already been prompted, if necessary, for the extra permissions.
|
| - void AddPermissions(const Extension* extension,
|
| - const ExtensionPermissionSet* permissions);
|
| -
|
| - // Removes the set of |permissions| from the |extension|'s active permission
|
| - // set and sends the relevant messages and notifications.
|
| - void RemovePermissions(const Extension* extension,
|
| - const ExtensionPermissionSet* permissions);
|
| -
|
| - private:
|
| - enum EventType {
|
| - ADDED,
|
| - REMOVED,
|
| - };
|
| -
|
| - // Dispatches specified event to the extension.
|
| - void DispatchEvent(const std::string& extension_id,
|
| - const char* event_name,
|
| - const ExtensionPermissionSet* changed_permissions);
|
| -
|
| - // Issues the relevant events, messages and notifications when the
|
| - // |extension|'s permissions have |changed| (|changed| is the delta).
|
| - // Specifically, this sends the EXTENSION_PERMISSIONS_UPDATED notification,
|
| - // the ExtensionMsg_UpdatePermissions IPC message, and fires the
|
| - // onAdded/onRemoved events in the extension.
|
| - void NotifyPermissionsUpdated(EventType event_type,
|
| - const Extension* extension,
|
| - const ExtensionPermissionSet* changed);
|
| -
|
| - ExtensionService* extension_service_;
|
| -};
|
| -
|
| -
|
| // chrome.permissions.contains
|
| class ContainsPermissionsFunction : public SyncExtensionFunction {
|
| virtual ~ContainsPermissionsFunction() {}
|
| @@ -101,7 +59,6 @@ class RequestPermissionsFunction : public AsyncExtensionFunction,
|
| private:
|
| scoped_ptr<ExtensionInstallUI> install_ui_;
|
| scoped_refptr<ExtensionPermissionSet> requested_permissions_;
|
| - const Extension* extension_;
|
| DECLARE_EXTENSION_FUNCTION_NAME("permissions.request")
|
| };
|
|
|
|
|