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

Side by Side Diff: chrome/common/extensions/extension_messages.cc

Issue 8849010: Add 'web_accessible_resource" keyword for version 2 extension manifests. This makes extension res... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/common/extensions/extension_messages.h" 5 #include "chrome/common/extensions/extension_messages.h"
6 6
7 #include "chrome/common/extensions/extension_constants.h" 7 #include "chrome/common/extensions/extension_constants.h"
8 #include "chrome/common/extensions/manifest.h" 8 #include "chrome/common/extensions/manifest.h"
9 #include "content/public/common/common_param_traits.h" 9 #include "content/public/common/common_param_traits.h"
10 10
(...skipping 30 matching lines...) Expand all
41 extension_manifest_keys::kApp, 41 extension_manifest_keys::kApp,
42 extension_manifest_keys::kContentScripts, 42 extension_manifest_keys::kContentScripts,
43 extension_manifest_keys::kIcons, 43 extension_manifest_keys::kIcons,
44 extension_manifest_keys::kName, 44 extension_manifest_keys::kName,
45 extension_manifest_keys::kPageAction, 45 extension_manifest_keys::kPageAction,
46 extension_manifest_keys::kPageActions, 46 extension_manifest_keys::kPageActions,
47 extension_manifest_keys::kPermissions, 47 extension_manifest_keys::kPermissions,
48 extension_manifest_keys::kPlatformApp, 48 extension_manifest_keys::kPlatformApp,
49 extension_manifest_keys::kPublicKey, 49 extension_manifest_keys::kPublicKey,
50 extension_manifest_keys::kVersion, 50 extension_manifest_keys::kVersion,
51 extension_manifest_keys::kWebAccessibleResources,
51 }; 52 };
52 53
53 // Copy only the data we need and bypass the manifest type checks. 54 // Copy only the data we need and bypass the manifest type checks.
54 DictionaryValue* source = extension->manifest()->value(); 55 DictionaryValue* source = extension->manifest()->value();
55 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kRendererExtensionKeys); ++i) { 56 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kRendererExtensionKeys); ++i) {
56 Value* temp = NULL; 57 Value* temp = NULL;
57 if (source->Get(kRendererExtensionKeys[i], &temp)) 58 if (source->Get(kRendererExtensionKeys[i], &temp))
58 manifest->Set(kRendererExtensionKeys[i], temp->DeepCopy()); 59 manifest->Set(kRendererExtensionKeys[i], temp->DeepCopy());
59 } 60 }
60 } 61 }
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 ReadParam(m, iter, &p->explicit_hosts) && 190 ReadParam(m, iter, &p->explicit_hosts) &&
190 ReadParam(m, iter, &p->scriptable_hosts); 191 ReadParam(m, iter, &p->scriptable_hosts);
191 } 192 }
192 193
193 void ParamTraits<ExtensionMsg_Loaded_Params>::Log(const param_type& p, 194 void ParamTraits<ExtensionMsg_Loaded_Params>::Log(const param_type& p,
194 std::string* l) { 195 std::string* l) {
195 l->append(p.id); 196 l->append(p.id);
196 } 197 }
197 198
198 } // namespace IPC 199 } // namespace IPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698