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

Side by Side Diff: examples/ui/tile/tile_app.h

Issue 1559723002: Update the UI examples. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-14
Patch Set: address feedback 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 | « examples/ui/tile/BUILD.gn ('k') | examples/ui/tile/tile_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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 #ifndef EXAMPLES_UI_TILE_TILE_APP_H_ 5 #ifndef EXAMPLES_UI_TILE_TILE_APP_H_
6 #define EXAMPLES_UI_TILE_TILE_APP_H_ 6 #define EXAMPLES_UI_TILE_TILE_APP_H_
7 7
8 #include "base/bind.h" 8 #include "mojo/ui/view_provider_app.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "mojo/common/strong_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 9
18 namespace examples { 10 namespace examples {
19 11
20 class TileApp : public mojo::ApplicationDelegate, 12 class TileApp : public mojo::ui::ViewProviderApp {
21 public mojo::InterfaceFactory<mojo::ui::ViewProvider> {
22 public: 13 public:
23 TileApp(); 14 TileApp();
24 ~TileApp() override; 15 ~TileApp() override;
25 16
26 // |ApplicationDelegate|: 17 bool CreateView(
27 void Initialize(mojo::ApplicationImpl* app) override; 18 const std::string& connection_url,
28 bool ConfigureIncomingConnection( 19 mojo::InterfaceRequest<mojo::ServiceProvider> services,
29 mojo::ApplicationConnection* connection) override; 20 mojo::ServiceProviderPtr exposed_services,
30 21 const mojo::ui::ViewProvider::CreateViewCallback& callback) override;
31 // |InterfaceFactory<mojo::ui::ViewProvider>|:
32 void Create(mojo::ApplicationConnection* connection,
33 mojo::InterfaceRequest<mojo::ui::ViewProvider> request) override;
34 22
35 private: 23 private:
36 mojo::ApplicationImpl* app_impl_;
37 mojo::StrongBindingSet<mojo::ui::ViewProvider> bindings_;
38
39 DISALLOW_COPY_AND_ASSIGN(TileApp); 24 DISALLOW_COPY_AND_ASSIGN(TileApp);
40 }; 25 };
41 26
42 } // namespace examples 27 } // namespace examples
43 28
44 #endif // EXAMPLES_UI_TILE_TILE_APP_H_ 29 #endif // EXAMPLES_UI_TILE_TILE_APP_H_
OLDNEW
« no previous file with comments | « examples/ui/tile/BUILD.gn ('k') | examples/ui/tile/tile_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698