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

Side by Side Diff: extensions/renderer/dispatcher.cc

Issue 2816513002: Revert of Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « extensions/renderer/argument_spec.cc ('k') | google_apis/gaia/gaia_auth_fetcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/renderer/dispatcher.h" 5 #include "extensions/renderer/dispatcher.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 const base::ListValue* args, 147 const base::ListValue* args,
148 ScriptContext* context) { 148 ScriptContext* context) {
149 v8::HandleScope handle_scope(context->isolate()); 149 v8::HandleScope handle_scope(context->isolate());
150 v8::Context::Scope context_scope(context->v8_context()); 150 v8::Context::Scope context_scope(context->v8_context());
151 151
152 std::unique_ptr<content::V8ValueConverter> converter( 152 std::unique_ptr<content::V8ValueConverter> converter(
153 content::V8ValueConverter::create()); 153 content::V8ValueConverter::create());
154 154
155 std::vector<v8::Local<v8::Value>> arguments; 155 std::vector<v8::Local<v8::Value>> arguments;
156 for (const auto& arg : *args) { 156 for (const auto& arg : *args) {
157 arguments.push_back(converter->ToV8Value(&arg, context->v8_context())); 157 arguments.push_back(converter->ToV8Value(arg.get(), context->v8_context()));
158 } 158 }
159 159
160 context->module_system()->CallModuleMethodSafe( 160 context->module_system()->CallModuleMethodSafe(
161 module_name, method_name, &arguments); 161 module_name, method_name, &arguments);
162 } 162 }
163 163
164 // This handles the "chrome." root API object in script contexts. 164 // This handles the "chrome." root API object in script contexts.
165 class ChromeNativeHandler : public ObjectBackedNativeHandler { 165 class ChromeNativeHandler : public ObjectBackedNativeHandler {
166 public: 166 public:
167 explicit ChromeNativeHandler(ScriptContext* context) 167 explicit ChromeNativeHandler(ScriptContext* context)
(...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1466 // The "guestViewDeny" module must always be loaded last. It registers 1466 // The "guestViewDeny" module must always be loaded last. It registers
1467 // error-providing custom elements for the GuestView types that are not 1467 // error-providing custom elements for the GuestView types that are not
1468 // available, and thus all of those types must have been checked and loaded 1468 // available, and thus all of those types must have been checked and loaded
1469 // (or not loaded) beforehand. 1469 // (or not loaded) beforehand.
1470 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) { 1470 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) {
1471 module_system->Require("guestViewDeny"); 1471 module_system->Require("guestViewDeny");
1472 } 1472 }
1473 } 1473 }
1474 1474
1475 } // namespace extensions 1475 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/renderer/argument_spec.cc ('k') | google_apis/gaia/gaia_auth_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698