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

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: applied review comments 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
OLDNEW
(Empty)
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
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 // |ApplicationDelegate|:
28 void Initialize(mojo::ApplicationImpl* app) override;
29 bool ConfigureIncomingConnection(
30 mojo::ApplicationConnection* connection) override;
31
32 // |InterfaceFactory<mojo::ui::ViewProvider>|:
33 void Create(mojo::ApplicationConnection* connection,
34 mojo::InterfaceRequest<mojo::ui::ViewProvider> request) override;
35
36 // |ViewProvider|:
37 void CreateView(mojo::InterfaceRequest<mojo::ServiceProvider> services,
38 mojo::ServiceProviderPtr exposed_services,
39 const CreateViewCallback& callback) override;
40
41 mojo::ApplicationImpl* app_impl_;
jamesr 2015/10/27 23:04:23 put these in private (you may want to put all of t
jeffbrown 2015/10/27 23:48:16 Yup. Just an oversight.
42 mojo::BindingSet<mojo::ui::ViewProvider> bindings_;
43
44 DISALLOW_COPY_AND_ASSIGN(SpinningCubeApp);
45 };
46
47 } // namespace examples
48
49 #endif // EXAMPLES_UI_SPINNING_CUBE_SPINNING_CUBE_APP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698