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

Unified Diff: examples/ui/jank/jank.cc

Issue 1991853003: Make BaseView et al. take an ApplicationConnector instead of an ApplicationImpl. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: doh 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_view.cc ('k') | examples/ui/noodles/noodles_app.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 c3efb638b6bb15d88de0822ec52fa68e9650da85..aedb12eebf997001f7be0d83e433bb53590ab1cc 100644
--- a/examples/ui/jank/jank.cc
+++ b/examples/ui/jank/jank.cc
@@ -10,6 +10,7 @@
#include "base/macros.h"
#include "mojo/application/application_runner_chromium.h"
#include "mojo/public/c/system/main.h"
+#include "mojo/public/cpp/application/connect.h"
#include "mojo/ui/choreographer.h"
#include "mojo/ui/ganesh_view.h"
#include "mojo/ui/input_handler.h"
@@ -53,9 +54,9 @@ class JankView : public mojo::ui::GaneshView,
public mojo::ui::ChoreographerDelegate,
public mojo::ui::InputListener {
public:
- JankView(mojo::ApplicationImpl* app_impl,
+ JankView(mojo::InterfaceHandle<mojo::ApplicationConnector> app_connector,
mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request)
- : GaneshView(app_impl, view_owner_request.Pass(), "Jank"),
+ : GaneshView(app_connector.Pass(), view_owner_request.Pass(), "Jank"),
choreographer_(scene(), this),
input_handler_(GetViewServiceProvider(), this),
typeface_(skia::AdoptRef(SkTypeface::CreateFromStream(
@@ -210,7 +211,8 @@ class JankApp : public mojo::ui::ViewProviderApp {
mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request,
mojo::InterfaceRequest<mojo::ServiceProvider> services,
mojo::InterfaceHandle<mojo::ServiceProvider> exposed_services) override {
- new JankView(app_impl(), view_owner_request.Pass());
+ new JankView(mojo::CreateApplicationConnector(app_impl()->shell()),
+ view_owner_request.Pass());
}
private:
« no previous file with comments | « examples/shadows/shadows_view.cc ('k') | examples/ui/noodles/noodles_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698