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

Side by Side Diff: shell/android/native_viewport_application_loader.cc

Issue 868463008: Remove Client relationship between mojo.Shell/mojo.Application (Closed) Base URL: git@github.com:domokit/mojo.git@app_impl_init
Patch Set: fix android 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "shell/android/native_viewport_application_loader.h" 5 #include "shell/android/native_viewport_application_loader.h"
6 6
7 #include "mojo/public/cpp/application/application_impl.h" 7 #include "mojo/public/cpp/application/application_impl.h"
8 #include "services/native_viewport/native_viewport_impl.h" 8 #include "services/native_viewport/native_viewport_impl.h"
9 #include "shell/android/keyboard_impl.h" 9 #include "shell/android/keyboard_impl.h"
10 10
11 namespace mojo { 11 namespace mojo {
12 namespace shell { 12 namespace shell {
13 13
14 NativeViewportApplicationLoader::NativeViewportApplicationLoader() { 14 NativeViewportApplicationLoader::NativeViewportApplicationLoader() {
15 } 15 }
16 16
17 NativeViewportApplicationLoader::~NativeViewportApplicationLoader() { 17 NativeViewportApplicationLoader::~NativeViewportApplicationLoader() {
18 } 18 }
19 19
20 void NativeViewportApplicationLoader::Load(ApplicationManager* manager, 20 void NativeViewportApplicationLoader::Load(
21 const GURL& url, 21 ApplicationManager* manager,
22 ShellPtr shell, 22 const GURL& url,
23 LoadCallback callback) { 23 InterfaceRequest<Application> application_request,
24 DCHECK(shell); 24 LoadCallback callback) {
25 app_.reset(new ApplicationImpl(this, shell.Pass())); 25 DCHECK(application_request.is_pending());
26 app_.reset(new ApplicationImpl(this, application_request.Pass()));
26 } 27 }
27 28
28 void NativeViewportApplicationLoader::OnApplicationError( 29 void NativeViewportApplicationLoader::OnApplicationError(
29 ApplicationManager* manager, 30 ApplicationManager* manager,
30 const GURL& url) { 31 const GURL& url) {
31 } 32 }
32 33
33 bool NativeViewportApplicationLoader::ConfigureIncomingConnection( 34 bool NativeViewportApplicationLoader::ConfigureIncomingConnection(
34 mojo::ApplicationConnection* connection) { 35 mojo::ApplicationConnection* connection) {
35 connection->AddService<NativeViewport>(this); 36 connection->AddService<NativeViewport>(this);
(...skipping 17 matching lines...) Expand all
53 54
54 void NativeViewportApplicationLoader::Create(ApplicationConnection* connection, 55 void NativeViewportApplicationLoader::Create(ApplicationConnection* connection,
55 InterfaceRequest<Gpu> request) { 56 InterfaceRequest<Gpu> request) {
56 if (!gpu_state_) 57 if (!gpu_state_)
57 gpu_state_ = new gles2::GpuImpl::State; 58 gpu_state_ = new gles2::GpuImpl::State;
58 new gles2::GpuImpl(request.Pass(), gpu_state_); 59 new gles2::GpuImpl(request.Pass(), gpu_state_);
59 } 60 }
60 61
61 } // namespace shell 62 } // namespace shell
62 } // namespace mojo 63 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698