| 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 EXAMPLES_SURFACES_APP_EMBEDDER_H_ | 5 #ifndef EXAMPLES_SURFACES_APP_EMBEDDER_H_ |
| 6 #define EXAMPLES_SURFACES_APP_EMBEDDER_H_ | 6 #define EXAMPLES_SURFACES_APP_EMBEDDER_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "cc/surfaces/surface_id.h" | 9 #include "cc/surfaces/surface_id.h" |
| 10 #include "mojo/services/surfaces/public/interfaces/surfaces.mojom.h" | 10 #include "mojo/services/surfaces/public/interfaces/display.mojom.h" |
| 11 #include "ui/gfx/size.h" | 11 #include "ui/gfx/size.h" |
| 12 | 12 |
| 13 namespace cc { | |
| 14 class CompositorFrame; | |
| 15 } | |
| 16 | |
| 17 namespace mojo { | 13 namespace mojo { |
| 18 | |
| 19 class ApplicationConnection; | |
| 20 | |
| 21 namespace examples { | 14 namespace examples { |
| 22 | 15 |
| 23 // Simple example of a surface embedder that embeds two other surfaces. | 16 // Simple example of a surface embedder that embeds two other surfaces. |
| 24 class Embedder { | 17 class Embedder { |
| 25 public: | 18 public: |
| 26 Embedder(uint32_t local_id, Surface* surface); | 19 explicit Embedder(Display* display); |
| 27 ~Embedder(); | 20 ~Embedder(); |
| 28 | 21 |
| 29 void ProduceFrame(cc::SurfaceId child_one, | 22 void ProduceFrame(cc::SurfaceId child_one, |
| 30 cc::SurfaceId child_two, | 23 cc::SurfaceId child_two, |
| 31 const gfx::Size& child_size, | 24 const gfx::Size& child_size, |
| 32 const gfx::Size& size, | 25 const gfx::Size& size, |
| 33 int offset); | 26 int offset); |
| 34 | 27 |
| 28 bool frame_pending() const { return frame_pending_; } |
| 29 |
| 35 private: | 30 private: |
| 36 uint32_t local_id_; | 31 Display* display_; |
| 37 Surface* surface_; | 32 bool frame_pending_; |
| 38 | 33 |
| 39 DISALLOW_COPY_AND_ASSIGN(Embedder); | 34 DISALLOW_COPY_AND_ASSIGN(Embedder); |
| 40 }; | 35 }; |
| 41 | 36 |
| 42 } // namespace examples | 37 } // namespace examples |
| 43 } // namespace mojo | 38 } // namespace mojo |
| 44 | 39 |
| 45 #endif // EXAMPLES_SURFACES_APP_EMBEDDER_H_ | 40 #endif // EXAMPLES_SURFACES_APP_EMBEDDER_H_ |
| OLD | NEW |