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

Side by Side Diff: gin/modules/module_runner_delegate.cc

Issue 74753002: Introduce gin_shell (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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 "gin/modules/module_runner_delegate.h"
6
7 #include "gin/modules/module_registry.h"
8
9 namespace gin {
10
11 ModuleRunnerDelegate::ModuleRunnerDelegate(const base::FilePath& module_base)
12 : module_provider_(module_base) {
13 }
14
15 ModuleRunnerDelegate::~ModuleRunnerDelegate() {
16 }
17
18 v8::Handle<v8::ObjectTemplate> ModuleRunnerDelegate::GetGlobalTemplate(
19 Runner* runner) {
20 v8::Handle<v8::ObjectTemplate> templ = v8::ObjectTemplate::New();
21 ModuleRegistry::RegisterGlobals(runner->isolate(), templ);
22 return templ;
23 }
24
25 void ModuleRunnerDelegate::DidRunScript(Runner* runner,
26 v8::Handle<v8::Script> script) {
27 ModuleRegistry* registry = ModuleRegistry::From(runner->context());
28 registry->AttemptToLoadMoreModules(runner->isolate());
29 module_provider_.AttempToLoadModules(
30 runner, registry->unsatisfied_dependencies());
31 }
32
33 } // namespace gin
OLDNEW
« gin/gin.gyp ('K') | « gin/modules/module_runner_delegate.h ('k') | gin/runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698