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

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

Issue 2001283002: Remove ViewProvider.CreateView()'s exposed_services. (Closed) Base URL: https://github.com/domokit/mojo.git@master
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 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 : pdf_library_(pdf_library), pdf_document_(pdf_document) { 265 : pdf_library_(pdf_library), pdf_document_(pdf_document) {
266 DCHECK(pdf_library_); 266 DCHECK(pdf_library_);
267 DCHECK(pdf_document_); 267 DCHECK(pdf_document_);
268 } 268 }
269 269
270 ~PDFContentViewProviderApp() override {} 270 ~PDFContentViewProviderApp() override {}
271 271
272 void CreateView( 272 void CreateView(
273 const std::string& connection_url, 273 const std::string& connection_url,
274 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request, 274 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request,
275 mojo::InterfaceRequest<mojo::ServiceProvider> services, 275 mojo::InterfaceRequest<mojo::ServiceProvider> services) override {
276 mojo::InterfaceHandle<mojo::ServiceProvider> exposed_services) override {
277 new PDFDocumentView(mojo::CreateApplicationConnector(app_impl()->shell()), 276 new PDFDocumentView(mojo::CreateApplicationConnector(app_impl()->shell()),
278 view_owner_request.Pass(), pdf_document_); 277 view_owner_request.Pass(), pdf_document_);
279 } 278 }
280 279
281 private: 280 private:
282 std::shared_ptr<PDFLibrary> pdf_library_; 281 std::shared_ptr<PDFLibrary> pdf_library_;
283 std::shared_ptr<PDFDocument> pdf_document_; 282 std::shared_ptr<PDFDocument> pdf_document_;
284 283
285 DISALLOW_COPY_AND_ASSIGN(PDFContentViewProviderApp); 284 DISALLOW_COPY_AND_ASSIGN(PDFContentViewProviderApp);
286 }; 285 };
(...skipping 22 matching lines...) Expand all
309 308
310 DISALLOW_COPY_AND_ASSIGN(PDFContentViewerApp); 309 DISALLOW_COPY_AND_ASSIGN(PDFContentViewerApp);
311 }; 310 };
312 311
313 } // namespace examples 312 } // namespace examples
314 313
315 MojoResult MojoMain(MojoHandle application_request) { 314 MojoResult MojoMain(MojoHandle application_request) {
316 mojo::ApplicationRunnerChromium runner(new examples::PDFContentViewerApp()); 315 mojo::ApplicationRunnerChromium runner(new examples::PDFContentViewerApp());
317 return runner.Run(application_request); 316 return runner.Run(application_request);
318 } 317 }
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