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

Unified Diff: mojo/ui/view_provider_app.h

Issue 2020453003: Convert ViewProviderApp and ContentViewerApp to implement ApplicationImplBase instead of Applicatio… (Closed) Base URL: https://github.com/domokit/mojo.git@work796_no_run_main_app
Patch Set: Created 4 years, 7 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 | « mojo/ui/content_viewer_app.cc ('k') | mojo/ui/view_provider_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/ui/view_provider_app.h
diff --git a/mojo/ui/view_provider_app.h b/mojo/ui/view_provider_app.h
index 9c8573338f4ab0f84290bcc49b3d1cf390aced24..a0b81b42cddb869c05845cc13b2677f5ad41a68c 100644
--- a/mojo/ui/view_provider_app.h
+++ b/mojo/ui/view_provider_app.h
@@ -8,14 +8,14 @@
#include <string>
#include "mojo/common/strong_binding_set.h"
-#include "mojo/public/c/system/main.h"
-#include "mojo/public/cpp/application/application_delegate.h"
-#include "mojo/public/cpp/application/application_impl.h"
-#include "mojo/public/cpp/application/service_provider_impl.h"
+#include "mojo/public/cpp/application/application_impl_base.h"
#include "mojo/public/cpp/system/macros.h"
#include "mojo/services/ui/views/interfaces/view_provider.mojom.h"
namespace mojo {
+
+class ServiceProviderImpl;
+
namespace ui {
// Abstract implementation of a simple application that offers a ViewProvider.
@@ -23,17 +23,14 @@ namespace ui {
//
// It is not necessary to use this class to implement all ViewProviders.
// This class is merely intended to make the simple apps easier to write.
-class ViewProviderApp : public ApplicationDelegate {
+class ViewProviderApp : public ApplicationImplBase {
public:
ViewProviderApp();
~ViewProviderApp() override;
- ApplicationImpl* app_impl() { return app_impl_; }
-
- // |ApplicationDelegate|:
- void Initialize(ApplicationImpl* app) override;
- bool ConfigureIncomingConnection(
- ServiceProviderImpl* service_provider_impl) override;
+ // |ApplicationImplBase|:
+ void OnInitialize() override;
+ bool OnAcceptConnection(ServiceProviderImpl* service_provider_impl) override;
// Called by the ViewProvider to create a view.
// This method may be called multiple times in the case where the
@@ -58,7 +55,6 @@ class ViewProviderApp : public ApplicationDelegate {
InterfaceRequest<ViewOwner> view_owner_request,
InterfaceRequest<ServiceProvider> services);
- ApplicationImpl* app_impl_ = nullptr;
StrongBindingSet<ViewProvider> bindings_;
MOJO_DISALLOW_COPY_AND_ASSIGN(ViewProviderApp);
« no previous file with comments | « mojo/ui/content_viewer_app.cc ('k') | mojo/ui/view_provider_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698