OLD | NEW |
| (Empty) |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "mojo/public/bindings/js/runner_delegate.h" | |
6 | |
7 #include "gin/modules/module_registry.h" | |
8 #include "mojo/public/bindings/js/core.h" | |
9 #include "mojo/public/bindings/js/global.h" | |
10 | |
11 namespace mojo { | |
12 namespace js { | |
13 | |
14 RunnerDelegate::RunnerDelegate() { | |
15 } | |
16 | |
17 RunnerDelegate::~RunnerDelegate() { | |
18 } | |
19 | |
20 v8::Handle<v8::ObjectTemplate> RunnerDelegate::GetGlobalTemplate( | |
21 gin::Runner* runner) { | |
22 return js::GetGlobalTemplate(runner->isolate()); | |
23 } | |
24 | |
25 void RunnerDelegate::DidCreateContext(gin::Runner* runner) { | |
26 v8::Handle<v8::Context> context = runner->context(); | |
27 gin::ModuleRegistry* registry = | |
28 gin::ModuleRegistry::From(context); | |
29 | |
30 registry->AddBuiltinModule(runner->isolate(), "core", | |
31 GetCoreTemplate(runner->isolate())); | |
32 } | |
33 | |
34 } // namespace js | |
35 } // namespace mojo | |
OLD | NEW |