| 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 #ifndef SKY_COMPOSITOR_SURFACE_HOLDER_H_ | 5 #ifndef SKY_COMPOSITOR_SURFACE_HOLDER_H_ |
| 6 #define SKY_COMPOSITOR_SURFACE_HOLDER_H_ | 6 #define SKY_COMPOSITOR_SURFACE_HOLDER_H_ |
| 7 | 7 |
| 8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 explicit SurfaceHolder(Client* client, mojo::Shell* shell); | 36 explicit SurfaceHolder(Client* client, mojo::Shell* shell); |
| 37 ~SurfaceHolder() override; | 37 ~SurfaceHolder() override; |
| 38 | 38 |
| 39 bool IsReadyForFrame() const; | 39 bool IsReadyForFrame() const; |
| 40 | 40 |
| 41 void SetSize(const gfx::Size& size); | 41 void SetSize(const gfx::Size& size); |
| 42 void SubmitFrame(mojo::FramePtr frame, const base::Closure& callback); | 42 void SubmitFrame(mojo::FramePtr frame, const base::Closure& callback); |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 // mojo::SurfaceClient | 45 // mojo::SurfaceClient |
| 46 void SetIdNamespace(uint32_t id_namespace) override; |
| 46 void ReturnResources( | 47 void ReturnResources( |
| 47 mojo::Array<mojo::ReturnedResourcePtr> resources) override; | 48 mojo::Array<mojo::ReturnedResourcePtr> resources) override; |
| 48 | 49 |
| 49 void OnSurfaceConnectionCreated(mojo::SurfacePtr surface, | 50 void OnSurfaceConnectionCreated(mojo::SurfacePtr surface, |
| 50 uint32_t id_namespace); | 51 uint32_t id_namespace); |
| 51 | 52 |
| 52 Client* client_; | 53 Client* client_; |
| 53 gfx::Size size_; | 54 gfx::Size size_; |
| 54 scoped_ptr<SurfaceAllocator> surface_allocator_; | 55 scoped_ptr<SurfaceAllocator> surface_allocator_; |
| 55 mojo::SurfacesServicePtr surfaces_service_; | 56 mojo::SurfacesServicePtr surfaces_service_; |
| 56 mojo::SurfacePtr surface_; | 57 mojo::SurfacePtr surface_; |
| 57 mojo::SurfaceIdPtr surface_id_; | 58 mojo::SurfaceIdPtr surface_id_; |
| 58 | 59 |
| 59 base::WeakPtrFactory<SurfaceHolder> weak_factory_; | 60 base::WeakPtrFactory<SurfaceHolder> weak_factory_; |
| 60 | 61 |
| 61 DISALLOW_COPY_AND_ASSIGN(SurfaceHolder); | 62 DISALLOW_COPY_AND_ASSIGN(SurfaceHolder); |
| 62 }; | 63 }; |
| 63 | 64 |
| 64 } // namespace sky | 65 } // namespace sky |
| 65 | 66 |
| 66 #endif // SKY_COMPOSITOR_SURFACE_HOLDER_H_ | 67 #endif // SKY_COMPOSITOR_SURFACE_HOLDER_H_ |
| OLD | NEW |