| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |