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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/macros.h" | 6 #include "base/macros.h" |
7 #include "base/memory/weak_ptr.h" | 7 #include "base/memory/weak_ptr.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "cc/surfaces/surface_id_allocator.h" | 9 #include "cc/surfaces/surface_id_allocator.h" |
10 #include "examples/surfaces_app/child.mojom.h" | 10 #include "examples/surfaces_app/child.mojom.h" |
11 #include "examples/surfaces_app/embedder.h" | 11 #include "examples/surfaces_app/embedder.h" |
12 #include "mojo/application/application_runner_chromium.h" | 12 #include "mojo/application/application_runner_chromium.h" |
13 #include "mojo/converters/geometry/geometry_type_converters.h" | 13 #include "mojo/converters/geometry/geometry_type_converters.h" |
14 #include "mojo/converters/surfaces/surfaces_type_converters.h" | 14 #include "mojo/converters/surfaces/surfaces_type_converters.h" |
15 #include "mojo/public/c/system/main.h" | 15 #include "mojo/public/c/system/main.h" |
16 #include "mojo/public/cpp/application/application_connection.h" | 16 #include "mojo/public/cpp/application/application_connection.h" |
17 #include "mojo/public/cpp/application/application_delegate.h" | 17 #include "mojo/public/cpp/application/application_delegate.h" |
18 #include "mojo/public/cpp/system/core.h" | 18 #include "mojo/public/cpp/system/core.h" |
19 #include "mojo/services/public/interfaces/gpu/command_buffer.mojom.h" | 19 #include "mojo/services/public/interfaces/gpu/command_buffer.mojom.h" |
20 #include "mojo/services/public/interfaces/gpu/gpu.mojom.h" | 20 #include "mojo/services/public/interfaces/gpu/gpu.mojom.h" |
21 #include "mojo/services/public/interfaces/native_viewport/native_viewport.mojom.
h" | 21 #include "mojo/services/public/interfaces/native_viewport/native_viewport.mojom.
h" |
22 #include "mojo/services/public/interfaces/surfaces/surfaces.mojom.h" | 22 #include "mojo/services/surfaces/public/interfaces/surfaces.mojom.h" |
23 #include "mojo/services/public/interfaces/surfaces/surfaces_service.mojom.h" | 23 #include "mojo/services/surfaces/public/interfaces/surfaces_service.mojom.h" |
24 #include "ui/gfx/rect.h" | 24 #include "ui/gfx/rect.h" |
25 | 25 |
26 namespace mojo { | 26 namespace mojo { |
27 namespace examples { | 27 namespace examples { |
28 | 28 |
29 class SurfacesApp : public ApplicationDelegate, | 29 class SurfacesApp : public ApplicationDelegate, |
30 public SurfaceClient, | 30 public SurfaceClient, |
31 public NativeViewportClient { | 31 public NativeViewportClient { |
32 public: | 32 public: |
33 SurfacesApp() : weak_factory_(this) {} | 33 SurfacesApp() : weak_factory_(this) {} |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 DISALLOW_COPY_AND_ASSIGN(SurfacesApp); | 128 DISALLOW_COPY_AND_ASSIGN(SurfacesApp); |
129 }; | 129 }; |
130 | 130 |
131 } // namespace examples | 131 } // namespace examples |
132 } // namespace mojo | 132 } // namespace mojo |
133 | 133 |
134 MojoResult MojoMain(MojoHandle shell_handle) { | 134 MojoResult MojoMain(MojoHandle shell_handle) { |
135 mojo::ApplicationRunnerChromium runner(new mojo::examples::SurfacesApp); | 135 mojo::ApplicationRunnerChromium runner(new mojo::examples::SurfacesApp); |
136 return runner.Run(shell_handle); | 136 return runner.Run(shell_handle); |
137 } | 137 } |
OLD | NEW |