| OLD | NEW |
| 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 "mandoline/ui/aura/surface_binding.h" | 5 #include "mandoline/ui/aura/surface_binding.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 mojo::URLRequestPtr request(mojo::URLRequest::New()); | 207 mojo::URLRequestPtr request(mojo::URLRequest::New()); |
| 208 request->url = mojo::String::From("mojo:surfaces_service"); | 208 request->url = mojo::String::From("mojo:surfaces_service"); |
| 209 shell_->ConnectToApplication(request.Pass(), | 209 shell_->ConnectToApplication(request.Pass(), |
| 210 GetProxy(&surfaces_service_provider), | 210 GetProxy(&surfaces_service_provider), |
| 211 nullptr); | 211 nullptr); |
| 212 ConnectToService(surfaces_service_provider.get(), &surface_); | 212 ConnectToService(surfaces_service_provider.get(), &surface_); |
| 213 surface_->GetIdNamespace( | 213 surface_->GetIdNamespace( |
| 214 base::Bind(&SurfaceBinding::PerViewManagerState::SetIdNamespace, | 214 base::Bind(&SurfaceBinding::PerViewManagerState::SetIdNamespace, |
| 215 base::Unretained(this))); | 215 base::Unretained(this))); |
| 216 // Block until we receive our id namespace. | 216 // Block until we receive our id namespace. |
| 217 surface_.WaitForIncomingMethodCall(); | 217 surface_.WaitForIncomingResponse(); |
| 218 DCHECK_NE(0u, id_namespace_); | 218 DCHECK_NE(0u, id_namespace_); |
| 219 | 219 |
| 220 mojo::ResourceReturnerPtr returner_ptr; | 220 mojo::ResourceReturnerPtr returner_ptr; |
| 221 returner_binding_.Bind(GetProxy(&returner_ptr)); | 221 returner_binding_.Bind(GetProxy(&returner_ptr)); |
| 222 surface_->SetResourceReturner(returner_ptr.Pass()); | 222 surface_->SetResourceReturner(returner_ptr.Pass()); |
| 223 | 223 |
| 224 mojo::ServiceProviderPtr gpu_service_provider; | 224 mojo::ServiceProviderPtr gpu_service_provider; |
| 225 // TODO(jamesr): Should be mojo:gpu_service | 225 // TODO(jamesr): Should be mojo:gpu_service |
| 226 mojo::URLRequestPtr request2(mojo::URLRequest::New()); | 226 mojo::URLRequestPtr request2(mojo::URLRequest::New()); |
| 227 request2->url = mojo::String::From("mojo:view_manager"); | 227 request2->url = mojo::String::From("mojo:view_manager"); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 248 } | 248 } |
| 249 | 249 |
| 250 SurfaceBinding::~SurfaceBinding() { | 250 SurfaceBinding::~SurfaceBinding() { |
| 251 } | 251 } |
| 252 | 252 |
| 253 scoped_ptr<cc::OutputSurface> SurfaceBinding::CreateOutputSurface() { | 253 scoped_ptr<cc::OutputSurface> SurfaceBinding::CreateOutputSurface() { |
| 254 return state_->CreateOutputSurface(view_); | 254 return state_->CreateOutputSurface(view_); |
| 255 } | 255 } |
| 256 | 256 |
| 257 } // namespace mandoline | 257 } // namespace mandoline |
| OLD | NEW |