1f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// Copyright 2013 The Chromium Authors. All rights reserved.
2f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
3f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// found in the LICENSE file.
4f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
5f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#ifndef MOJO_APPS_JS_MOJO_RUNNER_DELEGATE_H_
6f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#define MOJO_APPS_JS_MOJO_RUNNER_DELEGATE_H_
7f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
8f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include "base/compiler_specific.h"
9f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include "gin/modules/module_runner_delegate.h"
10effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch#include "mojo/public/c/system/core.h"
11f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
12f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)namespace mojo {
13f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)namespace apps {
14f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
15f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)class MojoRunnerDelegate : public gin::ModuleRunnerDelegate {
16f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) public:
17f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  MojoRunnerDelegate();
18f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  virtual ~MojoRunnerDelegate();
19f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
20f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  void Start(gin::Runner* runner, MojoHandle pipe, const std::string& module);
21f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
22f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) private:
23f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  // From ModuleRunnerDelegate:
24a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  virtual void UnhandledException(gin::ShellRunner* runner,
25f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)                                  gin::TryCatch& try_catch) OVERRIDE;
26f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
27f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  DISALLOW_COPY_AND_ASSIGN(MojoRunnerDelegate);
28f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)};
29f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
30f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)}  // namespace apps
31f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)}  // namespace mojo
32f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
33f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#endif  // MOJO_APPS_JS_MOJO_RUNNER_DELEGATE_H_
34