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

Side by Side Diff: examples/ui/png_viewer/png_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/pdf_viewer/pdf_viewer.cc ('k') | examples/ui/shapes/shapes_app.h » ('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 <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "mojo/application/application_runner_chromium.h" 10 #include "mojo/application/application_runner_chromium.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 PNGContentViewProviderApp(skia::RefPtr<SkImage> image) : image_(image) { 103 PNGContentViewProviderApp(skia::RefPtr<SkImage> image) : image_(image) {
104 DCHECK(image_); 104 DCHECK(image_);
105 } 105 }
106 106
107 ~PNGContentViewProviderApp() override {} 107 ~PNGContentViewProviderApp() override {}
108 108
109 void CreateView( 109 void CreateView(
110 const std::string& connection_url, 110 const std::string& connection_url,
111 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request, 111 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request,
112 mojo::InterfaceRequest<mojo::ServiceProvider> services, 112 mojo::InterfaceRequest<mojo::ServiceProvider> services,
113 mojo::ServiceProviderPtr exposed_services) override { 113 mojo::InterfaceHandle<mojo::ServiceProvider> exposed_services) override {
114 new PNGView(app_impl(), view_owner_request.Pass(), image_); 114 new PNGView(app_impl(), view_owner_request.Pass(), image_);
115 } 115 }
116 116
117 private: 117 private:
118 skia::RefPtr<SkImage> image_; 118 skia::RefPtr<SkImage> image_;
119 119
120 DISALLOW_COPY_AND_ASSIGN(PNGContentViewProviderApp); 120 DISALLOW_COPY_AND_ASSIGN(PNGContentViewProviderApp);
121 }; 121 };
122 122
123 class PNGContentViewerApp : public mojo::ui::ContentViewerApp { 123 class PNGContentViewerApp : public mojo::ui::ContentViewerApp {
(...skipping 23 matching lines...) Expand all
147 private: 147 private:
148 DISALLOW_COPY_AND_ASSIGN(PNGContentViewerApp); 148 DISALLOW_COPY_AND_ASSIGN(PNGContentViewerApp);
149 }; 149 };
150 150
151 } // namespace examples 151 } // namespace examples
152 152
153 MojoResult MojoMain(MojoHandle application_request) { 153 MojoResult MojoMain(MojoHandle application_request) {
154 mojo::ApplicationRunnerChromium runner(new examples::PNGContentViewerApp()); 154 mojo::ApplicationRunnerChromium runner(new examples::PNGContentViewerApp());
155 return runner.Run(application_request); 155 return runner.Run(application_request);
156 } 156 }
OLDNEW
« no previous file with comments | « examples/ui/pdf_viewer/pdf_viewer.cc ('k') | examples/ui/shapes/shapes_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698