| Index: sky/viewer/sky_viewer_base.cc
|
| diff --git a/sky/viewer/sky_viewer_base.cc b/sky/viewer/sky_viewer_base.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f9a46dfd8b8e96c9868f52f22627a2c34472fce2
|
| --- /dev/null
|
| +++ b/sky/viewer/sky_viewer_base.cc
|
| @@ -0,0 +1,37 @@
|
| +// Copyright 2015 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 "sky/viewer/sky_viewer_base.h"
|
| +
|
| +#include "sky/engine/public/web/Sky.h"
|
| +#include "sky/viewer/runtime_flags.h"
|
| +
|
| +namespace sky {
|
| +
|
| +SkyViewerBase::SkyViewerBase() {
|
| +}
|
| +
|
| +SkyViewerBase::~SkyViewerBase() {
|
| + blink::shutdown();
|
| +}
|
| +
|
| +void SkyViewerBase::Initialize(mojo::ApplicationImpl* app) {
|
| + RuntimeFlags::Initialize(app);
|
| +
|
| + mojo::NetworkServicePtr network_service;
|
| + app->ConnectToService("mojo:network_service", &network_service);
|
| + platform_impl_.reset(new PlatformImpl(network_service.Pass()));
|
| + blink::initialize(platform_impl_.get());
|
| +
|
| + mojo::icu::Initialize(app);
|
| + tracing_.Initialize(app);
|
| +}
|
| +
|
| +bool SkyViewerBase::ConfigureIncomingConnection(
|
| + mojo::ApplicationConnection* connection) {
|
| + connection->AddService<mojo::ContentHandler>(this);
|
| + return true;
|
| +}
|
| +
|
| +} // namespace sky
|
|
|