OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |