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

Side by Side Diff: components/native_viewport/native_viewport_application_delegate.cc

Issue 1131933009: Making Mandoline apps notice when all the objects they vended are gone so that it can terminate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update 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
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 "components/native_viewport/native_viewport_application_delegate.h" 5 #include "components/native_viewport/native_viewport_application_delegate.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "components/native_viewport/native_viewport_impl.h" 8 #include "components/native_viewport/native_viewport_impl.h"
9 #include "components/native_viewport/public/cpp/args.h" 9 #include "components/native_viewport/public/cpp/args.h"
10 #include "mojo/application/public/cpp/application_connection.h" 10 #include "mojo/application/public/cpp/application_connection.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 connection->AddService<mojo::NativeViewport>(this); 42 connection->AddService<mojo::NativeViewport>(this);
43 connection->AddService<mojo::Gpu>(this); 43 connection->AddService<mojo::Gpu>(this);
44 return true; 44 return true;
45 } 45 }
46 46
47 void NativeViewportApplicationDelegate::Create( 47 void NativeViewportApplicationDelegate::Create(
48 mojo::ApplicationConnection* connection, 48 mojo::ApplicationConnection* connection,
49 mojo::InterfaceRequest<mojo::NativeViewport> request) { 49 mojo::InterfaceRequest<mojo::NativeViewport> request) {
50 if (!gpu_state_.get()) 50 if (!gpu_state_.get())
51 gpu_state_ = new gles2::GpuState; 51 gpu_state_ = new gles2::GpuState;
52 new NativeViewportImpl(is_headless_, gpu_state_, request.Pass()); 52 new NativeViewportImpl(is_headless_, gpu_state_, request.Pass(),
53 app_lifetime_helper_.CreateAppRefCount());
53 } 54 }
54 55
55 void NativeViewportApplicationDelegate::Create( 56 void NativeViewportApplicationDelegate::Create(
56 mojo::ApplicationConnection* connection, 57 mojo::ApplicationConnection* connection,
57 mojo::InterfaceRequest<mojo::Gpu> request) { 58 mojo::InterfaceRequest<mojo::Gpu> request) {
58 if (!gpu_state_.get()) 59 if (!gpu_state_.get())
59 gpu_state_ = new gles2::GpuState; 60 gpu_state_ = new gles2::GpuState;
60 new gles2::GpuImpl(request.Pass(), gpu_state_); 61 new gles2::GpuImpl(request.Pass(), gpu_state_);
61 } 62 }
62 63
63 } // namespace native_viewport 64 } // namespace native_viewport
OLDNEW
« no previous file with comments | « components/native_viewport/native_viewport_application_delegate.h ('k') | components/native_viewport/native_viewport_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698