| Index: mojo/apps/js/standalone_main.cc
|
| diff --git a/mojo/apps/js/standalone_main.cc b/mojo/apps/js/standalone_main.cc
|
| deleted file mode 100644
|
| index 2fbf5065bb3a65e8b74300ebb2ddbcae0f730823..0000000000000000000000000000000000000000
|
| --- a/mojo/apps/js/standalone_main.cc
|
| +++ /dev/null
|
| @@ -1,59 +0,0 @@
|
| -// 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.
|
| -
|
| -#include "base/files/file_util.h"
|
| -#include "base/i18n/icu_util.h"
|
| -#include "mojo/application/application_runner_chromium.h"
|
| -#include "mojo/apps/js/application_delegate_impl.h"
|
| -#include "mojo/apps/js/js_app.h"
|
| -#include "mojo/public/c/system/main.h"
|
| -#include "mojo/public/cpp/application/application_delegate.h"
|
| -#include "mojo/public/cpp/application/application_impl.h"
|
| -
|
| -namespace mojo {
|
| -namespace apps {
|
| -
|
| -class StandaloneJSApp : public JSApp {
|
| - public:
|
| - StandaloneJSApp(ApplicationDelegateImpl* app_delegate_impl,
|
| - const base::FilePath& path)
|
| - : JSApp(app_delegate_impl),
|
| - path_(path) {
|
| - }
|
| -
|
| - bool Load(std::string* source, std::string* file_name) override {
|
| - *file_name = path_.AsUTF8Unsafe();
|
| - return ReadFileToString(path_, source);
|
| - }
|
| -
|
| - virtual MessagePipeHandle RequestorMessagePipeHandle() override {
|
| - return MessagePipeHandle();
|
| - }
|
| -
|
| - private:
|
| - base::FilePath path_;
|
| -};
|
| -
|
| -class StandaloneApplicationDelegateImpl : public ApplicationDelegateImpl {
|
| - private:
|
| - void Initialize(ApplicationImpl* app) override {
|
| - base::i18n::InitializeICU();
|
| - ApplicationDelegateImpl::Initialize(app);
|
| -
|
| - for (size_t i = 1; i < app->args().size(); i++) {
|
| - base::FilePath path(base::FilePath::FromUTF8Unsafe(app->args()[i]));
|
| - scoped_ptr<JSApp> js_app(new StandaloneJSApp(this, path));
|
| - StartJSApp(js_app.Pass());
|
| - }
|
| - }
|
| -};
|
| -
|
| -} // namespace apps
|
| -} // namespace mojo
|
| -
|
| -MojoResult MojoMain(MojoHandle shell_handle) {
|
| - mojo::ApplicationRunnerChromium runner(
|
| - new mojo::apps::StandaloneApplicationDelegateImpl());
|
| - return runner.Run(shell_handle);
|
| -}
|
|
|