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

Unified Diff: examples/ui/spinning_cube/spinning_cube_app.cc

Issue 1411103004: mozart: Port the spinning cube example. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « examples/ui/spinning_cube/spinning_cube_app.h ('k') | examples/ui/spinning_cube/spinning_cube_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/ui/spinning_cube/spinning_cube_app.cc
diff --git a/examples/ui/spinning_cube/spinning_cube_app.cc b/examples/ui/spinning_cube/spinning_cube_app.cc
new file mode 100644
index 0000000000000000000000000000000000000000..6bee8d4cd252239c526259110d60f74933b4432a
--- /dev/null
+++ b/examples/ui/spinning_cube/spinning_cube_app.cc
@@ -0,0 +1,37 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "examples/ui/spinning_cube/spinning_cube_app.h"
+#include "examples/ui/spinning_cube/spinning_cube_view.h"
+
+namespace examples {
+
+SpinningCubeApp::SpinningCubeApp() {}
+
+SpinningCubeApp::~SpinningCubeApp() {}
+
+void SpinningCubeApp::Initialize(mojo::ApplicationImpl* app_impl) {
+ app_impl_ = app_impl;
+}
+
+bool SpinningCubeApp::ConfigureIncomingConnection(
+ mojo::ApplicationConnection* connection) {
+ connection->AddService<mojo::ui::ViewProvider>(this);
+ return true;
+}
+
+void SpinningCubeApp::Create(
+ mojo::ApplicationConnection* connection,
+ mojo::InterfaceRequest<mojo::ui::ViewProvider> request) {
+ bindings_.AddBinding(this, request.Pass());
+}
+
+void SpinningCubeApp::CreateView(
+ mojo::InterfaceRequest<mojo::ServiceProvider> services,
+ mojo::ServiceProviderPtr exposed_services,
+ const CreateViewCallback& callback) {
+ new SpinningCubeView(app_impl_, callback);
+}
+
+} // namespace examples
« no previous file with comments | « examples/ui/spinning_cube/spinning_cube_app.h ('k') | examples/ui/spinning_cube/spinning_cube_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698