Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(454)

Side by Side Diff: examples/spinning_cube/spinning_cube_app.cc

Issue 1647953007: Remove DartPackage annotation from NativeViewport and GPU mojoms (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebased Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | mojo/dart/packages/mojo_services/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <assert.h> 5 #include <assert.h>
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "examples/spinning_cube/gles2_client_impl.h" 11 #include "examples/spinning_cube/gles2_client_impl.h"
12 #include "mojo/public/c/system/main.h" 12 #include "mojo/public/c/system/main.h"
13 #include "mojo/public/cpp/application/application_connection.h" 13 #include "mojo/public/cpp/application/application_connection.h"
14 #include "mojo/public/cpp/application/application_delegate.h" 14 #include "mojo/public/cpp/application/application_delegate.h"
15 #include "mojo/public/cpp/application/application_impl.h" 15 #include "mojo/public/cpp/application/application_impl.h"
16 #include "mojo/public/cpp/application/application_runner.h" 16 #include "mojo/public/cpp/application/application_runner.h"
17 #include "mojo/public/cpp/system/core.h" 17 #include "mojo/public/cpp/system/core.h"
18 #include "mojo/public/cpp/system/macros.h" 18 #include "mojo/public/cpp/system/macros.h"
19 #include "mojo/public/cpp/utility/run_loop.h" 19 #include "mojo/public/cpp/utility/run_loop.h"
20 #include "mojo/services/native_viewport/interfaces/native_viewport.mojom.h" 20 #include "mojo/services/native_viewport/interfaces/native_viewport.mojom.h"
21 #include "mojo/services/native_viewport/interfaces/native_viewport_event_dispatc her.mojom.h"
21 22
22 namespace examples { 23 namespace examples {
23 24
24 class SpinningCubeApp : public mojo::ApplicationDelegate, 25 class SpinningCubeApp : public mojo::ApplicationDelegate,
25 public mojo::NativeViewportEventDispatcher { 26 public mojo::NativeViewportEventDispatcher {
26 public: 27 public:
27 SpinningCubeApp() : dispatcher_binding_(this) {} 28 SpinningCubeApp() : dispatcher_binding_(this) {}
28 29
29 ~SpinningCubeApp() override { 30 ~SpinningCubeApp() override {
30 // TODO(darin): Fix shutdown so we don't need to leak this. 31 // TODO(darin): Fix shutdown so we don't need to leak this.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 DISALLOW_COPY_AND_ASSIGN(SpinningCubeApp); 90 DISALLOW_COPY_AND_ASSIGN(SpinningCubeApp);
90 }; 91 };
91 92
92 } // namespace examples 93 } // namespace examples
93 94
94 MojoResult MojoMain(MojoHandle application_request) { 95 MojoResult MojoMain(MojoHandle application_request) {
95 mojo::ApplicationRunner runner(std::unique_ptr<examples::SpinningCubeApp>( 96 mojo::ApplicationRunner runner(std::unique_ptr<examples::SpinningCubeApp>(
96 new examples::SpinningCubeApp())); 97 new examples::SpinningCubeApp()));
97 return runner.Run(application_request); 98 return runner.Run(application_request);
98 } 99 }
OLDNEW
« no previous file with comments | « no previous file | mojo/dart/packages/mojo_services/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698