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

Side by Side Diff: examples/ui/spinning_cube/spinning_cube_app.h

Issue 1411103004: mozart: Port the spinning cube example. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 1 month 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 | « examples/ui/spinning_cube/main.cc ('k') | examples/ui/spinning_cube/spinning_cube_app.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 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_UI_SPINNING_CUBE_SPINNING_CUBE_APP_H_
6 #define EXAMPLES_UI_SPINNING_CUBE_SPINNING_CUBE_APP_H_
7
8 #include "base/bind.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "mojo/common/binding_set.h"
11 #include "mojo/public/c/system/main.h"
12 #include "mojo/public/cpp/application/application_connection.h"
13 #include "mojo/public/cpp/application/application_impl.h"
14 #include "mojo/public/cpp/system/core.h"
15 #include "mojo/public/cpp/system/macros.h"
16 #include "mojo/services/ui/views/interfaces/view_provider.mojom.h"
17
18 namespace examples {
19
20 class SpinningCubeApp : public mojo::ApplicationDelegate,
21 public mojo::InterfaceFactory<mojo::ui::ViewProvider>,
22 public mojo::ui::ViewProvider {
23 public:
24 SpinningCubeApp();
25 ~SpinningCubeApp() override;
26
27 private:
28 // |ApplicationDelegate|:
29 void Initialize(mojo::ApplicationImpl* app) override;
30 bool ConfigureIncomingConnection(
31 mojo::ApplicationConnection* connection) override;
32
33 // |InterfaceFactory<mojo::ui::ViewProvider>|:
34 void Create(mojo::ApplicationConnection* connection,
35 mojo::InterfaceRequest<mojo::ui::ViewProvider> request) override;
36
37 // |ViewProvider|:
38 void CreateView(mojo::InterfaceRequest<mojo::ServiceProvider> services,
39 mojo::ServiceProviderPtr exposed_services,
40 const CreateViewCallback& callback) override;
41
42 mojo::ApplicationImpl* app_impl_;
43 mojo::BindingSet<mojo::ui::ViewProvider> bindings_;
44
45 DISALLOW_COPY_AND_ASSIGN(SpinningCubeApp);
46 };
47
48 } // namespace examples
49
50 #endif // EXAMPLES_UI_SPINNING_CUBE_SPINNING_CUBE_APP_H_
OLDNEW
« no previous file with comments | « examples/ui/spinning_cube/main.cc ('k') | examples/ui/spinning_cube/spinning_cube_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698