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

Unified Diff: examples/ui/pdf_viewer/pdf_viewer.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/ui/noodles/noodles_app.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 f16be50ed1dfd8ffbf6889304cfcebfed0a39aac..3043c4bed1f39c399a5857acbceeba1a61cb551e 100644
--- a/examples/ui/pdf_viewer/pdf_viewer.cc
+++ b/examples/ui/pdf_viewer/pdf_viewer.cc
@@ -8,14 +8,16 @@
#include "base/bind.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
-#include "mojo/application/application_runner_chromium.h"
#include "mojo/data_pipe_utils/data_pipe_utils.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/content_viewer_app.h"
#include "mojo/ui/ganesh_view.h"
#include "mojo/ui/input_handler.h"
+#include "mojo/ui/view_provider_app.h"
#include "third_party/pdfium/fpdfsdk/include/fpdf_ext.h"
#include "third_party/pdfium/fpdfsdk/include/fpdfview.h"
#include "third_party/skia/include/core/SkCanvas.h"
@@ -272,7 +274,7 @@ class PDFContentViewProviderApp : public mojo::ui::ViewProviderApp {
const std::string& connection_url,
mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request,
mojo::InterfaceRequest<mojo::ServiceProvider> services) override {
- new PDFDocumentView(mojo::CreateApplicationConnector(app_impl()->shell()),
+ new PDFDocumentView(mojo::CreateApplicationConnector(shell()),
view_owner_request.Pass(), pdf_document_);
}
@@ -311,6 +313,7 @@ class PDFContentViewerApp : public mojo::ui::ContentViewerApp {
} // namespace examples
MojoResult MojoMain(MojoHandle application_request) {
- mojo::ApplicationRunnerChromium runner(new examples::PDFContentViewerApp());
- return runner.Run(application_request);
+ mojo::ScopedChromiumInit init;
+ examples::PDFContentViewerApp pdf_content_viewer_app;
+ return mojo::RunApplication(application_request, &pdf_content_viewer_app);
}
« no previous file with comments | « examples/ui/noodles/noodles_app.cc ('k') | examples/ui/png_viewer/png_viewer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698