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