| Index: mojo/public/cpp/application/application_runner_chromium.h
|
| diff --git a/mojo/public/cpp/application/application_runner_chromium.h b/mojo/public/cpp/application/application_runner_chromium.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..570484b3f400d9bfe11db979cbcb976c6e2cdd29
|
| --- /dev/null
|
| +++ b/mojo/public/cpp/application/application_runner_chromium.h
|
| @@ -0,0 +1,40 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef MOJO_PUBLIC_APPLICATION_APPLICATION_RUNNER_CHROMIUM_H_
|
| +#define MOJO_PUBLIC_APPLICATION_APPLICATION_RUNNER_CHROMIUM_H_
|
| +
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "base/message_loop/message_loop.h"
|
| +#include "mojo/public/cpp/system/core.h"
|
| +
|
| +namespace mojo {
|
| +
|
| +class ApplicationDelegate;
|
| +
|
| +class ApplicationRunnerChromium {
|
| + public:
|
| + ApplicationRunnerChromium();
|
| + ~ApplicationRunnerChromium();
|
| +
|
| + void take_delegate(scoped_ptr<ApplicationDelegate> delegate);
|
| + void set_loop_type(base::MessageLoop::Type type);
|
| + MojoResult Run(MojoHandle shell_handle);
|
| +
|
| + private:
|
| + // Optional delegate.
|
| + scoped_ptr<ApplicationDelegate> delegate_;
|
| +
|
| + // MessageLoop type. TYPE_DEFAULT is default.
|
| + base::MessageLoop::Type loop_type_;
|
| +};
|
| +
|
| +template <typename T>
|
| +scoped_ptr<ApplicationDelegate> make_scoped_delegate(T* delegate) {
|
| + return scoped_ptr<ApplicationDelegate>(delegate);
|
| +}
|
| +
|
| +} // namespace mojo
|
| +
|
| +#endif // MOJO_PUBLIC_APPLICATION_APPLICATION_RUNNER_CHROMIUM_H_
|
|
|