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

Unified Diff: apps/shell/shell_extensions_client.cc

Issue 149163002: app_shell: Add ShellContentRendererClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase (content_renderer_client) Created 6 years, 11 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
« no previous file with comments | « apps/shell/shell_browser_main_parts.cc ('k') | apps/shell/shell_main_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/shell/shell_extensions_client.cc
diff --git a/apps/shell/shell_extensions_client.cc b/apps/shell/shell_extensions_client.cc
index aa8073d04b71f66c0ece74b7eb890e7977c58dda..ffd63b41357a02316a15f39c50e4389b361121f5 100644
--- a/apps/shell/shell_extensions_client.cc
+++ b/apps/shell/shell_extensions_client.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "chrome/common/extensions/features/base_feature_provider.h"
+#include "chrome/common/extensions/permissions/chrome_api_permissions.h"
#include "extensions/common/common_manifest_handlers.h"
#include "extensions/common/manifest_handler.h"
#include "extensions/common/permissions/permission_message_provider.h"
@@ -25,25 +26,6 @@ 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
@@ -101,8 +83,18 @@ void ShellExtensionsClient::Initialize() {
const extensions::PermissionsProvider&
ShellExtensionsClient::GetPermissionsProvider() const {
- NOTIMPLEMENTED();
- static ShellPermissionsProvider provider;
+ // TODO(jamescook): app_shell needs a way to use a subset of the Chrome
+ // extension Features and Permissions. In particular, the lists of Features
+ // (including API features, manifest features and permission features) are
+ // listed in JSON files from c/c/e/api that are included into Chrome's
+ // resources.pak (_api_features.json and _permission_features.json). The
+ // PermissionsProvider must match the set of permissions used by the features
+ // in those files. We either need to make app_shell (and hence the extensions
+ // module) know about all possible permissions, or create a mechanism whereby
+ // we can build our own JSON files with only a subset of the data. For now,
+ // just provide all permissions Chrome knows about. Fixing this issue is
+ // http://crbug.com/339301
+ static extensions::ChromeAPIPermissions provider;
return provider;
}
« no previous file with comments | « apps/shell/shell_browser_main_parts.cc ('k') | apps/shell/shell_main_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698