mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
This CL contains enough plumbing for Sky to render content to the screen using Ganesh in SkyShell. We're still missing the ability to load data off the network. R=eseidel@chromium.org, ojan@chromium.org Review URL: https://codereview.chromium.org/936883002
35 lines
942 B
C++
35 lines
942 B
C++
// 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/shell/ui/platform_impl.h"
|
|
|
|
#include "mojo/public/cpp/application/connect.h"
|
|
|
|
namespace sky {
|
|
namespace shell {
|
|
|
|
PlatformImpl::PlatformImpl(mojo::ServiceProviderPtr service_provider)
|
|
: main_thread_task_runner_(base::MessageLoop::current()->task_runner()),
|
|
service_provider_(service_provider.Pass()) {
|
|
mojo::ConnectToService(service_provider_.get(), &network_service_);
|
|
}
|
|
|
|
PlatformImpl::~PlatformImpl() {
|
|
}
|
|
|
|
blink::WebString PlatformImpl::defaultLocale() {
|
|
return blink::WebString::fromUTF8("en-US");
|
|
}
|
|
|
|
base::SingleThreadTaskRunner* PlatformImpl::mainThreadTaskRunner() {
|
|
return main_thread_task_runner_.get();
|
|
}
|
|
|
|
mojo::NetworkService* PlatformImpl::networkService() {
|
|
return network_service_.get();
|
|
}
|
|
|
|
} // namespace shell
|
|
} // namespace sky
|