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/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "cc/surfaces/surface_id_allocator.h" | 8 #include "cc/surfaces/surface_id_allocator.h" |
9 #include "mojo/examples/surfaces_app/child.mojom.h" | 9 #include "mojo/examples/surfaces_app/child.mojom.h" |
10 #include "mojo/examples/surfaces_app/embedder.h" | 10 #include "mojo/examples/surfaces_app/embedder.h" |
11 #include "mojo/public/cpp/application/application_connection.h" | 11 #include "mojo/public/cpp/application/application_connection.h" |
12 #include "mojo/public/cpp/application/application_delegate.h" | 12 #include "mojo/public/cpp/application/application_delegate.h" |
| 13 #include "mojo/public/cpp/application/application_export.h" |
| 14 #include "mojo/public/cpp/application/application_impl.h" |
| 15 #include "mojo/public/cpp/application/application_runner_chromium.h" |
13 #include "mojo/public/cpp/system/core.h" | 16 #include "mojo/public/cpp/system/core.h" |
14 #include "mojo/services/gles2/command_buffer.mojom.h" | 17 #include "mojo/services/gles2/command_buffer.mojom.h" |
15 #include "mojo/services/public/cpp/geometry/geometry_type_converters.h" | 18 #include "mojo/services/public/cpp/geometry/geometry_type_converters.h" |
16 #include "mojo/services/public/cpp/surfaces/surfaces_type_converters.h" | 19 #include "mojo/services/public/cpp/surfaces/surfaces_type_converters.h" |
17 #include "mojo/services/public/interfaces/native_viewport/native_viewport.mojom.
h" | 20 #include "mojo/services/public/interfaces/native_viewport/native_viewport.mojom.
h" |
18 #include "ui/gfx/rect.h" | 21 #include "ui/gfx/rect.h" |
19 | 22 |
20 namespace mojo { | 23 namespace mojo { |
21 namespace examples { | 24 namespace examples { |
22 | 25 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 cc::SurfaceId child_two_id_; | 124 cc::SurfaceId child_two_id_; |
122 gfx::Size size_; | 125 gfx::Size size_; |
123 gfx::Size child_size_; | 126 gfx::Size child_size_; |
124 | 127 |
125 NativeViewportPtr viewport_; | 128 NativeViewportPtr viewport_; |
126 | 129 |
127 DISALLOW_COPY_AND_ASSIGN(SurfacesApp); | 130 DISALLOW_COPY_AND_ASSIGN(SurfacesApp); |
128 }; | 131 }; |
129 | 132 |
130 } // namespace examples | 133 } // namespace examples |
| 134 } // namespace mojo |
131 | 135 |
132 // static | 136 extern "C" APPLICATION_EXPORT MojoResult CDECL MojoMain( |
133 ApplicationDelegate* ApplicationDelegate::Create() { | 137 MojoHandle shell_handle) { |
134 return new examples::SurfacesApp(); | 138 mojo::ApplicationRunnerChromium runner(new mojo::examples::SurfacesApp); |
| 139 return runner.Run(shell_handle); |
135 } | 140 } |
136 | |
137 } // namespace mojo | |
OLD | NEW |