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

Unified Diff: examples/moterm_example_app/moterm_example_app.cc

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 | « apps/moterm/moterm_app.cc ('k') | examples/shadows/main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/moterm_example_app/moterm_example_app.cc
diff --git a/examples/moterm_example_app/moterm_example_app.cc b/examples/moterm_example_app/moterm_example_app.cc
index e1ca20e5deee67a490da7db31ab21cc615cbbdb0..3a4ad0367f190caee9ab30a94cd4b07a9e09ce1e 100644
--- a/examples/moterm_example_app/moterm_example_app.cc
+++ b/examples/moterm_example_app/moterm_example_app.cc
@@ -15,12 +15,11 @@
#include "base/memory/weak_ptr.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
-#include "mojo/application/application_runner_chromium.h"
#include "mojo/common/binding_set.h"
+#include "mojo/environment/scoped_chromium_init.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/connect.h"
+#include "mojo/public/cpp/application/run_application.h"
#include "mojo/public/cpp/bindings/array.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
#include "mojo/public/interfaces/application/service_provider.mojom.h"
@@ -166,7 +165,7 @@ class MotermExampleApp : public mojo::ui::ViewProviderApp {
const std::string& connection_url,
mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request,
mojo::InterfaceRequest<mojo::ServiceProvider> services) override {
- new MotermExampleAppView(app_impl()->shell(), view_owner_request.Pass());
+ new MotermExampleAppView(shell(), view_owner_request.Pass());
}
private:
@@ -174,6 +173,7 @@ class MotermExampleApp : public mojo::ui::ViewProviderApp {
};
MojoResult MojoMain(MojoHandle application_request) {
- mojo::ApplicationRunnerChromium runner(new MotermExampleApp());
- return runner.Run(application_request);
+ mojo::ScopedChromiumInit init;
+ MotermExampleApp moterm_example_app;
+ return mojo::RunApplication(application_request, &moterm_example_app);
}
« no previous file with comments | « apps/moterm/moterm_app.cc ('k') | examples/shadows/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698