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

Unified Diff: examples/ui/pdf_viewer/pdf_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/noodles/noodles_view.cc ('k') | examples/ui/png_viewer/png_viewer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/ui/pdf_viewer/pdf_viewer.cc
diff --git a/examples/ui/pdf_viewer/pdf_viewer.cc b/examples/ui/pdf_viewer/pdf_viewer.cc
index 8fd344106d91914fba83c5265b3f0fe1c09e56dd..2209ba8e2b4dca76240f4f6f7fd2c3f9ef0045cc 100644
--- a/examples/ui/pdf_viewer/pdf_viewer.cc
+++ b/examples/ui/pdf_viewer/pdf_viewer.cc
@@ -11,6 +11,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/choreographer.h"
#include "mojo/ui/content_viewer_app.h"
#include "mojo/ui/ganesh_view.h"
@@ -116,10 +117,12 @@ class PDFDocumentView : public mojo::ui::GaneshView,
public mojo::ui::InputListener {
public:
PDFDocumentView(
- mojo::ApplicationImpl* app_impl,
+ mojo::InterfaceHandle<mojo::ApplicationConnector> app_connector,
mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request,
const std::shared_ptr<PDFDocument>& pdf_document)
- : GaneshView(app_impl, view_owner_request.Pass(), "PDFDocumentViewer"),
+ : GaneshView(app_connector.Pass(),
+ view_owner_request.Pass(),
+ "PDFDocumentViewer"),
pdf_document_(pdf_document),
choreographer_(scene(), this),
input_handler_(GetViewServiceProvider(), this) {
@@ -271,7 +274,8 @@ class PDFContentViewProviderApp : 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 PDFDocumentView(app_impl(), view_owner_request.Pass(), pdf_document_);
+ new PDFDocumentView(mojo::CreateApplicationConnector(app_impl()->shell()),
+ view_owner_request.Pass(), pdf_document_);
}
private:
« no previous file with comments | « examples/ui/noodles/noodles_view.cc ('k') | examples/ui/png_viewer/png_viewer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698