Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Side by Side Diff: sky/shell/ui/platform_impl.cc

Issue 936883002: Connect Sky and Ganesh in SkyShell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Address review comments Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/shell/ui/platform_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sky/shell/ui/platform_impl.h" 5 #include "sky/shell/ui/platform_impl.h"
6 6
7 #include "mojo/public/cpp/application/connect.h"
8
7 namespace sky { 9 namespace sky {
8 namespace shell { 10 namespace shell {
9 11
10 PlatformImpl::PlatformImpl() 12 PlatformImpl::PlatformImpl(mojo::ServiceProviderPtr service_provider)
11 : main_thread_task_runner_(base::MessageLoop::current()->task_runner()) { 13 : main_thread_task_runner_(base::MessageLoop::current()->task_runner()),
14 service_provider_(service_provider.Pass()) {
15 mojo::ConnectToService(service_provider_.get(), &network_service_);
12 } 16 }
13 17
14 PlatformImpl::~PlatformImpl() { 18 PlatformImpl::~PlatformImpl() {
15 } 19 }
16 20
17 blink::WebString PlatformImpl::defaultLocale() { 21 blink::WebString PlatformImpl::defaultLocale() {
18 return blink::WebString::fromUTF8("en-US"); 22 return blink::WebString::fromUTF8("en-US");
19 } 23 }
20 24
21 base::SingleThreadTaskRunner* PlatformImpl::mainThreadTaskRunner() { 25 base::SingleThreadTaskRunner* PlatformImpl::mainThreadTaskRunner() {
22 return main_thread_task_runner_.get(); 26 return main_thread_task_runner_.get();
23 } 27 }
24 28
29 mojo::NetworkService* PlatformImpl::networkService() {
30 return network_service_.get();
31 }
32
25 } // namespace shell 33 } // namespace shell
26 } // namespace sky 34 } // namespace sky
OLDNEW
« no previous file with comments | « sky/shell/ui/platform_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698