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

Side by Side Diff: services/js/js_app_runner_delegate.cc

Issue 767323002: Mojo JS Bindings: restore the ServiceProvider class, add an application test (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Removed console import from ServiceProvider Created 6 years 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
« no previous file with comments | « services/js/js_app_bridge_module.cc ('k') | services/js/js_apptests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "services/js/js_app_runner_delegate.h" 5 #include "services/js/js_app_runner_delegate.h"
6 6
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "gin/modules/console.h" 8 #include "gin/modules/console.h"
9 #include "mojo/edk/js/core.h" 9 #include "mojo/edk/js/core.h"
10 #include "mojo/edk/js/handle.h" 10 #include "mojo/edk/js/handle.h"
(...skipping 11 matching lines...) Expand all
22 PathService::Get(base::DIR_EXE, &search_paths[1]); 22 PathService::Get(base::DIR_EXE, &search_paths[1]);
23 search_paths[1] = search_paths[1].AppendASCII("gen"); 23 search_paths[1] = search_paths[1].AppendASCII("gen");
24 return search_paths; 24 return search_paths;
25 } 25 }
26 26
27 } // namespace 27 } // namespace
28 28
29 JSAppRunnerDelegate::JSAppRunnerDelegate() 29 JSAppRunnerDelegate::JSAppRunnerDelegate()
30 : ModuleRunnerDelegate(GetModuleSearchPaths()) { 30 : ModuleRunnerDelegate(GetModuleSearchPaths()) {
31 AddBuiltinModule(gin::Console::kModuleName, gin::Console::GetModule); 31 AddBuiltinModule(gin::Console::kModuleName, gin::Console::GetModule);
32 AddBuiltinModule(js::Core::kModuleName, js::Core::GetModule); 32 AddBuiltinModule(Core::kModuleName, Core::GetModule);
33 AddBuiltinModule(js::Support::kModuleName, js::Support::GetModule); 33 AddBuiltinModule(Support::kModuleName, Support::GetModule);
34 AddBuiltinModule(js::Threading::kModuleName, js::Threading::GetModule); 34 AddBuiltinModule(Threading::kModuleName, Threading::GetModule);
35 } 35 }
36 36
37 JSAppRunnerDelegate::~JSAppRunnerDelegate() { 37 JSAppRunnerDelegate::~JSAppRunnerDelegate() {
38 } 38 }
39 39
40 void JSAppRunnerDelegate::UnhandledException(gin::ShellRunner* runner, 40 void JSAppRunnerDelegate::UnhandledException(gin::ShellRunner* runner,
41 gin::TryCatch& try_catch) { 41 gin::TryCatch& try_catch) {
42 gin::ModuleRunnerDelegate::UnhandledException(runner, try_catch); 42 gin::ModuleRunnerDelegate::UnhandledException(runner, try_catch);
43 LOG(ERROR) << try_catch.GetStackTrace(); 43 LOG(ERROR) << try_catch.GetStackTrace();
44 } 44 }
45 45
46 } // namespace mojo 46 } // namespace mojo
47 } // namespace js 47 } // namespace js
48 48
OLDNEW
« no previous file with comments | « services/js/js_app_bridge_module.cc ('k') | services/js/js_apptests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698