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

Unified Diff: examples/ui/jank/jank.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 | « examples/shadows/shadows_app.cc ('k') | examples/ui/noodles/main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/ui/jank/jank.cc
diff --git a/examples/ui/jank/jank.cc b/examples/ui/jank/jank.cc
index 782525127658d2be2c8df88e523dcb5f6c416dd5..742e2dba0511d57414aaee59fc9047586b0c6477 100644
--- a/examples/ui/jank/jank.cc
+++ b/examples/ui/jank/jank.cc
@@ -8,9 +8,10 @@
#include "base/bind.h"
#include "base/macros.h"
-#include "mojo/application/application_runner_chromium.h"
+#include "mojo/environment/scoped_chromium_init.h"
#include "mojo/public/c/system/main.h"
#include "mojo/public/cpp/application/connect.h"
+#include "mojo/public/cpp/application/run_application.h"
#include "mojo/ui/choreographer.h"
#include "mojo/ui/ganesh_view.h"
#include "mojo/ui/input_handler.h"
@@ -210,7 +211,7 @@ class JankApp : public mojo::ui::ViewProviderApp {
const std::string& connection_url,
mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request,
mojo::InterfaceRequest<mojo::ServiceProvider> services) override {
- new JankView(mojo::CreateApplicationConnector(app_impl()->shell()),
+ new JankView(mojo::CreateApplicationConnector(shell()),
view_owner_request.Pass());
}
@@ -221,6 +222,7 @@ class JankApp : public mojo::ui::ViewProviderApp {
} // namespace examples
MojoResult MojoMain(MojoHandle application_request) {
- mojo::ApplicationRunnerChromium runner(new examples::JankApp());
- return runner.Run(application_request);
+ mojo::ScopedChromiumInit init;
+ examples::JankApp jank_app;
+ return mojo::RunApplication(application_request, &jank_app);
}
« no previous file with comments | « examples/shadows/shadows_app.cc ('k') | examples/ui/noodles/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698