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

Unified Diff: examples/ui/png_viewer/png_viewer.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/ui/pdf_viewer/pdf_viewer.cc ('k') | examples/ui/shapes/shapes_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/ui/png_viewer/png_viewer.cc
diff --git a/examples/ui/png_viewer/png_viewer.cc b/examples/ui/png_viewer/png_viewer.cc
index fc7589dcebf0d6188de9eaecda8d2a8207abaec1..bec7677f3ca02687e9d0318bedc3bcc833aaccac 100644
--- a/examples/ui/png_viewer/png_viewer.cc
+++ b/examples/ui/png_viewer/png_viewer.cc
@@ -10,6 +10,7 @@
#include "mojo/application/application_runner_chromium.h"
#include "mojo/data_pipe_utils/data_pipe_utils.h"
#include "mojo/public/c/system/main.h"
+#include "mojo/public/cpp/application/connect.h"
#include "mojo/ui/content_viewer_app.h"
#include "mojo/ui/ganesh_view.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -27,10 +28,12 @@ constexpr uint32_t kRootNodeId = mojo::gfx::composition::kSceneRootNodeId;
class PNGView : public mojo::ui::GaneshView {
public:
- PNGView(mojo::ApplicationImpl* app_impl,
+ PNGView(mojo::InterfaceHandle<mojo::ApplicationConnector> app_connector,
mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request,
const skia::RefPtr<SkImage>& image)
- : GaneshView(app_impl, view_owner_request.Pass(), "PNGViewer"),
+ : GaneshView(app_connector.Pass(),
+ view_owner_request.Pass(),
+ "PNGViewer"),
image_(image) {
DCHECK(image_);
}
@@ -119,7 +122,8 @@ class PNGContentViewProviderApp : 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 PNGView(app_impl(), view_owner_request.Pass(), image_);
+ new PNGView(mojo::CreateApplicationConnector(app_impl()->shell()),
+ view_owner_request.Pass(), image_);
}
private:
« no previous file with comments | « examples/ui/pdf_viewer/pdf_viewer.cc ('k') | examples/ui/shapes/shapes_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698