| OLD | NEW |
| 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/fake_surfaces/fake_surfaces_service_application.h" | 5 #include "services/fake_surfaces/fake_surfaces_service_application.h" |
| 6 | 6 |
| 7 #include "mojo/application/application_runner_chromium.h" | 7 #include "mojo/application/application_runner_chromium.h" |
| 8 #include "mojo/public/c/system/main.h" | 8 #include "mojo/public/c/system/main.h" |
| 9 #include "mojo/public/cpp/application/application_connection.h" | 9 #include "mojo/public/cpp/application/application_connection.h" |
| 10 #include "mojo/public/cpp/bindings/strong_binding.h" | 10 #include "mojo/public/cpp/bindings/strong_binding.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 ret->sync_point = 0u; | 47 ret->sync_point = 0u; |
| 48 ret->count = 1; | 48 ret->count = 1; |
| 49 ret->lost = false; | 49 ret->lost = false; |
| 50 returned[i] = ret.Pass(); | 50 returned[i] = ret.Pass(); |
| 51 } | 51 } |
| 52 returner_->ReturnResources(returned.Pass()); | 52 returner_->ReturnResources(returned.Pass()); |
| 53 } | 53 } |
| 54 | 54 |
| 55 void DestroySurface(uint32_t local_id) override {} | 55 void DestroySurface(uint32_t local_id) override {} |
| 56 | 56 |
| 57 void CreateGLES2BoundSurface( | |
| 58 mojo::CommandBufferPtr gles2_client, | |
| 59 uint32_t local_id, | |
| 60 mojo::SizePtr size, | |
| 61 mojo::InterfaceRequest<mojo::ViewportParameterListener> listener_request) | |
| 62 override {} | |
| 63 | |
| 64 private: | 57 private: |
| 65 const uint32_t id_namespace_; | 58 const uint32_t id_namespace_; |
| 66 mojo::ResourceReturnerPtr returner_; | 59 mojo::ResourceReturnerPtr returner_; |
| 67 mojo::StrongBinding<mojo::Surface> binding_; | 60 mojo::StrongBinding<mojo::Surface> binding_; |
| 68 | 61 |
| 69 DISALLOW_COPY_AND_ASSIGN(FakeSurfaceImpl); | 62 DISALLOW_COPY_AND_ASSIGN(FakeSurfaceImpl); |
| 70 }; | 63 }; |
| 71 | 64 |
| 72 FakeSurfacesServiceApplication::FakeSurfacesServiceApplication() | 65 FakeSurfacesServiceApplication::FakeSurfacesServiceApplication() |
| 73 : next_id_namespace_(1u) { | 66 : next_id_namespace_(1u) { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 92 new FakeSurfaceImpl(next_id_namespace_++, request.Pass()); | 85 new FakeSurfaceImpl(next_id_namespace_++, request.Pass()); |
| 93 } | 86 } |
| 94 | 87 |
| 95 } // namespace fake_surfaces | 88 } // namespace fake_surfaces |
| 96 | 89 |
| 97 MojoResult MojoMain(MojoHandle shell_handle) { | 90 MojoResult MojoMain(MojoHandle shell_handle) { |
| 98 mojo::ApplicationRunnerChromium runner( | 91 mojo::ApplicationRunnerChromium runner( |
| 99 new fake_surfaces::FakeSurfacesServiceApplication); | 92 new fake_surfaces::FakeSurfacesServiceApplication); |
| 100 return runner.Run(shell_handle); | 93 return runner.Run(shell_handle); |
| 101 } | 94 } |
| OLD | NEW |