Index: examples/ui/spinning_cube/spinning_cube_app.h |
diff --git a/examples/ui/spinning_cube/spinning_cube_app.h b/examples/ui/spinning_cube/spinning_cube_app.h |
index d1e99e7c58a31655bda705a2b361c4549ff26f6c..e658717afd3fed5caeb0fe6ab78043c3ce247855 100644 |
--- a/examples/ui/spinning_cube/spinning_cube_app.h |
+++ b/examples/ui/spinning_cube/spinning_cube_app.h |
@@ -5,43 +5,22 @@ |
#ifndef EXAMPLES_UI_SPINNING_CUBE_SPINNING_CUBE_APP_H_ |
#define EXAMPLES_UI_SPINNING_CUBE_SPINNING_CUBE_APP_H_ |
-#include "base/bind.h" |
-#include "base/memory/scoped_ptr.h" |
-#include "mojo/common/binding_set.h" |
-#include "mojo/public/c/system/main.h" |
-#include "mojo/public/cpp/application/application_connection.h" |
-#include "mojo/public/cpp/application/application_impl.h" |
-#include "mojo/public/cpp/system/core.h" |
-#include "mojo/public/cpp/system/macros.h" |
-#include "mojo/services/ui/views/interfaces/view_provider.mojom.h" |
+#include "mojo/ui/view_provider_app.h" |
namespace examples { |
-class SpinningCubeApp : public mojo::ApplicationDelegate, |
- public mojo::InterfaceFactory<mojo::ui::ViewProvider>, |
- public mojo::ui::ViewProvider { |
+class SpinningCubeApp : public mojo::ui::ViewProviderApp { |
public: |
SpinningCubeApp(); |
~SpinningCubeApp() override; |
- private: |
- // |ApplicationDelegate|: |
- void Initialize(mojo::ApplicationImpl* app) override; |
- bool ConfigureIncomingConnection( |
- mojo::ApplicationConnection* connection) override; |
- |
- // |InterfaceFactory<mojo::ui::ViewProvider>|: |
- void Create(mojo::ApplicationConnection* connection, |
- mojo::InterfaceRequest<mojo::ui::ViewProvider> request) override; |
- |
- // |ViewProvider|: |
- void CreateView(mojo::InterfaceRequest<mojo::ServiceProvider> services, |
- mojo::ServiceProviderPtr exposed_services, |
- const CreateViewCallback& callback) override; |
- |
- mojo::ApplicationImpl* app_impl_; |
- mojo::BindingSet<mojo::ui::ViewProvider> bindings_; |
+ bool CreateView( |
+ const std::string& connection_url, |
+ mojo::InterfaceRequest<mojo::ServiceProvider> services, |
+ mojo::ServiceProviderPtr exposed_services, |
+ const mojo::ui::ViewProvider::CreateViewCallback& callback) override; |
+ private: |
DISALLOW_COPY_AND_ASSIGN(SpinningCubeApp); |
}; |