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

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

Issue 7071025: Use WebFrame::setIsolatedWorldSecurityOrigin to allow cross-origin XHRs in content scripts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove isolated worlds when extension is unloaded Created 9 years, 7 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 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 "content/common/common_param_traits.h" 8 #include "content/common/common_param_traits.h"
9 9
10 ExtensionMsg_Loaded_Params::ExtensionMsg_Loaded_Params() 10 ExtensionMsg_Loaded_Params::ExtensionMsg_Loaded_Params()
(...skipping 20 matching lines...) Expand all
31 // As we need more bits of extension data in the renderer, add more keys to 31 // As we need more bits of extension data in the renderer, add more keys to
32 // this list. 32 // this list.
33 const char* kRendererExtensionKeys[] = { 33 const char* kRendererExtensionKeys[] = {
34 extension_manifest_keys::kPublicKey, 34 extension_manifest_keys::kPublicKey,
35 extension_manifest_keys::kName, 35 extension_manifest_keys::kName,
36 extension_manifest_keys::kVersion, 36 extension_manifest_keys::kVersion,
37 extension_manifest_keys::kIcons, 37 extension_manifest_keys::kIcons,
38 extension_manifest_keys::kPageAction, 38 extension_manifest_keys::kPageAction,
39 extension_manifest_keys::kPageActions, 39 extension_manifest_keys::kPageActions,
40 extension_manifest_keys::kPermissions, 40 extension_manifest_keys::kPermissions,
41 extension_manifest_keys::kApp 41 extension_manifest_keys::kApp,
42 extension_manifest_keys::kContentScripts
42 }; 43 };
43 44
44 // Copy only the data we need. 45 // Copy only the data we need.
45 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kRendererExtensionKeys); ++i) { 46 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kRendererExtensionKeys); ++i) {
46 Value* temp = NULL; 47 Value* temp = NULL;
47 if (extension->manifest_value()->Get(kRendererExtensionKeys[i], &temp)) 48 if (extension->manifest_value()->Get(kRendererExtensionKeys[i], &temp))
48 manifest->Set(kRendererExtensionKeys[i], temp->DeepCopy()); 49 manifest->Set(kRendererExtensionKeys[i], temp->DeepCopy());
49 } 50 }
50 } 51 }
51 52
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 ReadParam(m, iter, &p->path) && 143 ReadParam(m, iter, &p->path) &&
143 ReadParam(m, iter, p->manifest.get()); 144 ReadParam(m, iter, p->manifest.get());
144 } 145 }
145 146
146 void ParamTraits<ExtensionMsg_Loaded_Params>::Log(const param_type& p, 147 void ParamTraits<ExtensionMsg_Loaded_Params>::Log(const param_type& p,
147 std::string* l) { 148 std::string* l) {
148 l->append(p.id); 149 l->append(p.id);
149 } 150 }
150 151
151 } // namespace IPC 152 } // namespace IPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698