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

Side by Side Diff: mojo/public/bindings/js/runner_delegate.cc

Issue 69843003: Implement Mojo message codec in JavaScript (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Aaron's comments Created 7 years, 1 month 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
« no previous file with comments | « mojo/public/bindings/js/runner_delegate.h ('k') | mojo/public/bindings/js/test/run_js_tests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
OLDNEW
« no previous file with comments | « mojo/public/bindings/js/runner_delegate.h ('k') | mojo/public/bindings/js/test/run_js_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698