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

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

Issue 1866103002: [Extensions] Expand bindings access checks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 4 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
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/runtime_custom_bindings.h" 5 #include "extensions/renderer/runtime_custom_bindings.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 14 matching lines...) Expand all
25 25
26 using content::V8ValueConverter; 26 using content::V8ValueConverter;
27 27
28 namespace extensions { 28 namespace extensions {
29 29
30 RuntimeCustomBindings::RuntimeCustomBindings(ScriptContext* context) 30 RuntimeCustomBindings::RuntimeCustomBindings(ScriptContext* context)
31 : ObjectBackedNativeHandler(context) { 31 : ObjectBackedNativeHandler(context) {
32 RouteFunction( 32 RouteFunction(
33 "GetManifest", 33 "GetManifest",
34 base::Bind(&RuntimeCustomBindings::GetManifest, base::Unretained(this))); 34 base::Bind(&RuntimeCustomBindings::GetManifest, base::Unretained(this)));
35 RouteFunction("OpenChannelToExtension", 35 RouteFunction("OpenChannelToExtension", "runtime.connect",
36 base::Bind(&RuntimeCustomBindings::OpenChannelToExtension, 36 base::Bind(&RuntimeCustomBindings::OpenChannelToExtension,
37 base::Unretained(this))); 37 base::Unretained(this)));
38 RouteFunction("OpenChannelToNativeApp", 38 RouteFunction("OpenChannelToNativeApp", "runtime.connectNative",
39 base::Bind(&RuntimeCustomBindings::OpenChannelToNativeApp, 39 base::Bind(&RuntimeCustomBindings::OpenChannelToNativeApp,
40 base::Unretained(this))); 40 base::Unretained(this)));
41 RouteFunction("GetExtensionViews", 41 RouteFunction("GetExtensionViews",
42 base::Bind(&RuntimeCustomBindings::GetExtensionViews, 42 base::Bind(&RuntimeCustomBindings::GetExtensionViews,
43 base::Unretained(this))); 43 base::Unretained(this)));
44 } 44 }
45 45
46 RuntimeCustomBindings::~RuntimeCustomBindings() { 46 RuntimeCustomBindings::~RuntimeCustomBindings() {
47 } 47 }
48 48
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 v8::Local<v8::Value> window = context->Global(); 172 v8::Local<v8::Value> window = context->Global();
173 DCHECK(!window.IsEmpty()); 173 DCHECK(!window.IsEmpty());
174 v8_views->Set(v8::Integer::New(args.GetIsolate(), v8_index++), window); 174 v8_views->Set(v8::Integer::New(args.GetIsolate(), v8_index++), window);
175 } 175 }
176 } 176 }
177 177
178 args.GetReturnValue().Set(v8_views); 178 args.GetReturnValue().Set(v8_views);
179 } 179 }
180 180
181 } // namespace extensions 181 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/renderer/render_frame_observer_natives.cc ('k') | extensions/renderer/test_features_native_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698