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

Side by Side Diff: services/native_viewport/app_delegate.cc

Issue 1975993002: Change InterfaceFactory<I>::Create() to take a ConnectionContext instead of an ApplicationConnectio… (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 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 | « services/native_viewport/app_delegate.h ('k') | services/prediction/prediction_service_impl.h » ('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 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 "services/native_viewport/app_delegate.h" 5 #include "services/native_viewport/app_delegate.h"
6 6
7 #include <vector> 7 #include <vector>
8 #include "gpu/config/gpu_util.h" 8 #include "gpu/config/gpu_util.h"
9 9
10 namespace native_viewport { 10 namespace native_viewport {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 gfx::GLSurface::InitializeOneOffForTests(); 52 gfx::GLSurface::InitializeOneOffForTests();
53 else if (application->HasArg(mojo::kUseOSMesa)) 53 else if (application->HasArg(mojo::kUseOSMesa))
54 gfx::GLSurface::InitializeOneOff(gfx::kGLImplementationOSMesaGL); 54 gfx::GLSurface::InitializeOneOff(gfx::kGLImplementationOSMesaGL);
55 else 55 else
56 gfx::GLSurface::InitializeOneOff(); 56 gfx::GLSurface::InitializeOneOff();
57 57
58 is_headless_ = application->HasArg(mojo::kUseHeadlessConfig); 58 is_headless_ = application->HasArg(mojo::kUseHeadlessConfig);
59 } 59 }
60 60
61 bool NativeViewportAppDelegate::ConfigureIncomingConnection( 61 bool NativeViewportAppDelegate::ConfigureIncomingConnection(
62 ApplicationConnection* connection) { 62 mojo::ApplicationConnection* connection) {
63 connection->AddService<NativeViewport>(this); 63 connection->AddService<mojo::NativeViewport>(this);
64 connection->AddService<Gpu>(this); 64 connection->AddService<mojo::Gpu>(this);
65 return true; 65 return true;
66 } 66 }
67 67
68 void NativeViewportAppDelegate::Create( 68 void NativeViewportAppDelegate::Create(
69 ApplicationConnection* connection, 69 const mojo::ConnectionContext& connection_context,
70 mojo::InterfaceRequest<NativeViewport> request) { 70 mojo::InterfaceRequest<mojo::NativeViewport> request) {
71 if (!gpu_state_.get()) 71 if (!gpu_state_.get())
72 gpu_state_ = new gles2::GpuState; 72 gpu_state_ = new gles2::GpuState;
73 new NativeViewportImpl(application_, is_headless_, gpu_state_, 73 new NativeViewportImpl(application_, is_headless_, gpu_state_,
74 request.Pass()); 74 request.Pass());
75 } 75 }
76 76
77 void NativeViewportAppDelegate::Create(ApplicationConnection* connection, 77 void NativeViewportAppDelegate::Create(
78 mojo::InterfaceRequest<Gpu> request) { 78 const mojo::ConnectionContext& connection_context,
79 mojo::InterfaceRequest<mojo::Gpu> request) {
79 if (!gpu_state_.get()) 80 if (!gpu_state_.get())
80 gpu_state_ = new gles2::GpuState; 81 gpu_state_ = new gles2::GpuState;
81 new gles2::GpuImpl(request.Pass(), gpu_state_); 82 new gles2::GpuImpl(request.Pass(), gpu_state_);
82 } 83 }
83 84
84 } // namespace native_viewport 85 } // namespace native_viewport
OLDNEW
« no previous file with comments | « services/native_viewport/app_delegate.h ('k') | services/prediction/prediction_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698