| Index: apps/shell/shell_extensions_client.cc
|
| diff --git a/apps/shell/shell_extensions_client.cc b/apps/shell/shell_extensions_client.cc
|
| deleted file mode 100644
|
| index aa8073d04b71f66c0ece74b7eb890e7977c58dda..0000000000000000000000000000000000000000
|
| --- a/apps/shell/shell_extensions_client.cc
|
| +++ /dev/null
|
| @@ -1,153 +0,0 @@
|
| -// Copyright 2013 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.
|
| -
|
| -#include "apps/shell/shell_extensions_client.h"
|
| -
|
| -#include "base/logging.h"
|
| -#include "chrome/common/extensions/features/base_feature_provider.h"
|
| -#include "extensions/common/common_manifest_handlers.h"
|
| -#include "extensions/common/manifest_handler.h"
|
| -#include "extensions/common/permissions/permission_message_provider.h"
|
| -#include "extensions/common/permissions/permissions_provider.h"
|
| -#include "extensions/common/url_pattern_set.h"
|
| -
|
| -using extensions::APIPermissionInfo;
|
| -using extensions::APIPermissionSet;
|
| -using extensions::Extension;
|
| -using extensions::Manifest;
|
| -using extensions::PermissionMessage;
|
| -using extensions::PermissionMessages;
|
| -using extensions::PermissionSet;
|
| -using extensions::URLPatternSet;
|
| -
|
| -namespace apps {
|
| -
|
| -namespace {
|
| -
|
| -// TODO(jamescook): Refactor ChromeAPIPermissions to share some of the
|
| -// permissions registration for app_shell. For now, allow no permissions.
|
| -class ShellPermissionsProvider : public extensions::PermissionsProvider {
|
| - public:
|
| - ShellPermissionsProvider() {}
|
| - virtual ~ShellPermissionsProvider() {}
|
| -
|
| - virtual std::vector<APIPermissionInfo*> GetAllPermissions() const OVERRIDE {
|
| - return std::vector<APIPermissionInfo*>();
|
| - }
|
| -
|
| - virtual std::vector<AliasInfo> GetAllAliases() const OVERRIDE {
|
| - return std::vector<AliasInfo>();
|
| - }
|
| -
|
| - private:
|
| - DISALLOW_COPY_AND_ASSIGN(ShellPermissionsProvider);
|
| -};
|
| -
|
| -// TODO(jamescook): Refactor ChromePermissionsMessageProvider so we can share
|
| -// code.
|
| -class ShellPermissionMessageProvider
|
| - : public extensions::PermissionMessageProvider {
|
| - public:
|
| - ShellPermissionMessageProvider() {}
|
| - virtual ~ShellPermissionMessageProvider() {}
|
| -
|
| - // PermissionMessageProvider implementation.
|
| - virtual PermissionMessages GetPermissionMessages(
|
| - const PermissionSet* permissions,
|
| - Manifest::Type extension_type) const OVERRIDE {
|
| - return PermissionMessages();
|
| - }
|
| -
|
| - virtual std::vector<base::string16> GetWarningMessages(
|
| - const PermissionSet* permissions,
|
| - Manifest::Type extension_type) const OVERRIDE {
|
| - return std::vector<base::string16>();
|
| - }
|
| -
|
| - virtual std::vector<base::string16> GetWarningMessagesDetails(
|
| - const PermissionSet* permissions,
|
| - Manifest::Type extension_type) const OVERRIDE {
|
| - return std::vector<base::string16>();
|
| - }
|
| -
|
| - virtual bool IsPrivilegeIncrease(
|
| - const PermissionSet* old_permissions,
|
| - const PermissionSet* new_permissions,
|
| - Manifest::Type extension_type) const OVERRIDE {
|
| - // Ensure we implement this before shipping.
|
| - CHECK(false);
|
| - return false;
|
| - }
|
| -
|
| - private:
|
| - DISALLOW_COPY_AND_ASSIGN(ShellPermissionMessageProvider);
|
| -};
|
| -
|
| -} // namespace
|
| -
|
| -ShellExtensionsClient::ShellExtensionsClient() {
|
| -}
|
| -
|
| -ShellExtensionsClient::~ShellExtensionsClient() {
|
| -}
|
| -
|
| -void ShellExtensionsClient::Initialize() {
|
| - extensions::RegisterCommonManifestHandlers();
|
| - extensions::ManifestHandler::FinalizeRegistration();
|
| -
|
| - // TODO(jamescook): Do we need to whitelist any extensions?
|
| -}
|
| -
|
| -const extensions::PermissionsProvider&
|
| -ShellExtensionsClient::GetPermissionsProvider() const {
|
| - NOTIMPLEMENTED();
|
| - static ShellPermissionsProvider provider;
|
| - return provider;
|
| -}
|
| -
|
| -const extensions::PermissionMessageProvider&
|
| -ShellExtensionsClient::GetPermissionMessageProvider() const {
|
| - NOTIMPLEMENTED();
|
| - static ShellPermissionMessageProvider provider;
|
| - return provider;
|
| -}
|
| -
|
| -extensions::FeatureProvider* ShellExtensionsClient::GetFeatureProviderByName(
|
| - const std::string& name) const {
|
| - // TODO(jamescook): Factor out an extensions module feature provider.
|
| - return extensions::BaseFeatureProvider::GetByName(name);
|
| -}
|
| -
|
| -void ShellExtensionsClient::FilterHostPermissions(
|
| - const URLPatternSet& hosts,
|
| - URLPatternSet* new_hosts,
|
| - std::set<PermissionMessage>* messages) const {
|
| - NOTIMPLEMENTED();
|
| -}
|
| -
|
| -void ShellExtensionsClient::SetScriptingWhitelist(
|
| - const ScriptingWhitelist& whitelist) {
|
| - scripting_whitelist_ = whitelist;
|
| -}
|
| -
|
| -const extensions::ExtensionsClient::ScriptingWhitelist&
|
| -ShellExtensionsClient::GetScriptingWhitelist() const {
|
| - // TODO(jamescook): Real whitelist.
|
| - return scripting_whitelist_;
|
| -}
|
| -
|
| -URLPatternSet ShellExtensionsClient::GetPermittedChromeSchemeHosts(
|
| - const Extension* extension,
|
| - const APIPermissionSet& api_permissions) const {
|
| - NOTIMPLEMENTED();
|
| - return URLPatternSet();
|
| -}
|
| -
|
| -bool ShellExtensionsClient::IsScriptableURL(const GURL& url,
|
| - std::string* error) const {
|
| - NOTIMPLEMENTED();
|
| - return true;
|
| -}
|
| -
|
| -} // namespace apps
|
|
|