| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "sky/viewer/sky_viewer_base.h" |
| 6 |
| 7 #include "sky/engine/public/web/Sky.h" |
| 8 #include "sky/viewer/runtime_flags.h" |
| 9 |
| 10 namespace sky { |
| 11 |
| 12 SkyViewerBase::SkyViewerBase() { |
| 13 } |
| 14 |
| 15 SkyViewerBase::~SkyViewerBase() { |
| 16 blink::shutdown(); |
| 17 } |
| 18 |
| 19 void SkyViewerBase::Initialize(mojo::ApplicationImpl* app) { |
| 20 RuntimeFlags::Initialize(app); |
| 21 |
| 22 mojo::NetworkServicePtr network_service; |
| 23 app->ConnectToService("mojo:network_service", &network_service); |
| 24 platform_impl_.reset(new PlatformImpl(network_service.Pass())); |
| 25 blink::initialize(platform_impl_.get()); |
| 26 |
| 27 mojo::icu::Initialize(app); |
| 28 tracing_.Initialize(app); |
| 29 } |
| 30 |
| 31 bool SkyViewerBase::ConfigureIncomingConnection( |
| 32 mojo::ApplicationConnection* connection) { |
| 33 connection->AddService<mojo::ContentHandler>(this); |
| 34 return true; |
| 35 } |
| 36 |
| 37 } // namespace sky |
| OLD | NEW |