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

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

Issue 1118843003: Remove some InterfacePtr<> methods which directly deal with message pipe handles. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 7 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/engine/core/html/HTMLIFrameElement.cpp ('k') | sky/shell/ui/internals.cc » ('j') | 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/engine.h" 5 #include "sky/shell/ui/engine.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "mojo/public/cpp/application/connect.h" 9 #include "mojo/public/cpp/application/connect.h"
10 #include "sky/engine/public/platform/WebInputEvent.h" 10 #include "sky/engine/public/platform/WebInputEvent.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 return weak_factory_.GetWeakPtr(); 51 return weak_factory_.GetWeakPtr();
52 } 52 }
53 53
54 mojo::ServiceProviderPtr Engine::CreateServiceProvider() { 54 mojo::ServiceProviderPtr Engine::CreateServiceProvider() {
55 mojo::MessagePipe pipe; 55 mojo::MessagePipe pipe;
56 config_.java_task_runner->PostTask( 56 config_.java_task_runner->PostTask(
57 FROM_HERE, 57 FROM_HERE,
58 base::Bind(CreateJavaServiceProvider, 58 base::Bind(CreateJavaServiceProvider,
59 base::Passed(mojo::MakeRequest<mojo::ServiceProvider>( 59 base::Passed(mojo::MakeRequest<mojo::ServiceProvider>(
60 pipe.handle1.Pass())))); 60 pipe.handle1.Pass()))));
61 return mojo::MakeProxy<mojo::ServiceProvider>(pipe.handle0.Pass()); 61 return mojo::MakeProxy(
62 mojo::InterfacePtrInfo<mojo::ServiceProvider>(pipe.handle0.Pass(), 0u));
62 } 63 }
63 64
64 void Engine::Init() { 65 void Engine::Init() {
65 TRACE_EVENT0("sky", "Engine::Init"); 66 TRACE_EVENT0("sky", "Engine::Init");
66 67
67 service_provider_ = CreateServiceProvider(); 68 service_provider_ = CreateServiceProvider();
68 mojo::NetworkServicePtr network_service; 69 mojo::NetworkServicePtr network_service;
69 mojo::ConnectToService(service_provider_.get(), &network_service); 70 mojo::ConnectToService(service_provider_.get(), &network_service);
70 platform_impl_.reset(new PlatformImpl(network_service.Pass())); 71 platform_impl_.reset(new PlatformImpl(network_service.Pass()));
71 72
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 198
198 void Engine::DidNavigateLocally(const mojo::String& url) { 199 void Engine::DidNavigateLocally(const mojo::String& url) {
199 } 200 }
200 201
201 void Engine::RequestNavigateHistory(int32_t delta) { 202 void Engine::RequestNavigateHistory(int32_t delta) {
202 NOTIMPLEMENTED(); 203 NOTIMPLEMENTED();
203 } 204 }
204 205
205 } // namespace shell 206 } // namespace shell
206 } // namespace sky 207 } // namespace sky
OLDNEW
« no previous file with comments | « sky/engine/core/html/HTMLIFrameElement.cpp ('k') | sky/shell/ui/internals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698