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

Side by Side Diff: examples/ui/pdf_viewer/pdf_viewer.cc

Issue 1682113003: Mojo C++ bindings: Generate InterfaceHandle<> instead of InterfacePtr<>. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebase ontop of master, address trung's comments Created 4 years, 10 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <memory> 5 #include <memory>
6 #include <string> 6 #include <string>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 DCHECK(pdf_library_); 253 DCHECK(pdf_library_);
254 DCHECK(pdf_document_); 254 DCHECK(pdf_document_);
255 } 255 }
256 256
257 ~PDFContentViewProviderApp() override {} 257 ~PDFContentViewProviderApp() override {}
258 258
259 void CreateView( 259 void CreateView(
260 const std::string& connection_url, 260 const std::string& connection_url,
261 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request, 261 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request,
262 mojo::InterfaceRequest<mojo::ServiceProvider> services, 262 mojo::InterfaceRequest<mojo::ServiceProvider> services,
263 mojo::ServiceProviderPtr exposed_services) override { 263 mojo::InterfaceHandle<mojo::ServiceProvider> exposed_services) override {
264 new PDFDocumentView(app_impl(), view_owner_request.Pass(), pdf_document_); 264 new PDFDocumentView(app_impl(), view_owner_request.Pass(), pdf_document_);
265 } 265 }
266 266
267 private: 267 private:
268 std::shared_ptr<PDFLibrary> pdf_library_; 268 std::shared_ptr<PDFLibrary> pdf_library_;
269 std::shared_ptr<PDFDocument> pdf_document_; 269 std::shared_ptr<PDFDocument> pdf_document_;
270 270
271 DISALLOW_COPY_AND_ASSIGN(PDFContentViewProviderApp); 271 DISALLOW_COPY_AND_ASSIGN(PDFContentViewProviderApp);
272 }; 272 };
273 273
(...skipping 21 matching lines...) Expand all
295 295
296 DISALLOW_COPY_AND_ASSIGN(PDFContentViewerApp); 296 DISALLOW_COPY_AND_ASSIGN(PDFContentViewerApp);
297 }; 297 };
298 298
299 } // namespace examples 299 } // namespace examples
300 300
301 MojoResult MojoMain(MojoHandle application_request) { 301 MojoResult MojoMain(MojoHandle application_request) {
302 mojo::ApplicationRunnerChromium runner(new examples::PDFContentViewerApp()); 302 mojo::ApplicationRunnerChromium runner(new examples::PDFContentViewerApp());
303 return runner.Run(application_request); 303 return runner.Run(application_request);
304 } 304 }
OLDNEW
« 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