Chromium Code Reviews

Side by Side Diff: examples/ui/png_viewer/png_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.
Jump to:
View unified diff |
« 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 102 matching lines...)
113 public: 113 public:
114 PNGContentViewProviderApp(skia::RefPtr<SkImage> image) : image_(image) { 114 PNGContentViewProviderApp(skia::RefPtr<SkImage> image) : image_(image) {
115 DCHECK(image_); 115 DCHECK(image_);
116 } 116 }
117 117
118 ~PNGContentViewProviderApp() override {} 118 ~PNGContentViewProviderApp() override {}
119 119
120 void CreateView( 120 void CreateView(
121 const std::string& connection_url, 121 const std::string& connection_url,
122 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request, 122 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request,
123 mojo::InterfaceRequest<mojo::ServiceProvider> services, 123 mojo::InterfaceRequest<mojo::ServiceProvider> services) override {
124 mojo::InterfaceHandle<mojo::ServiceProvider> exposed_services) override {
125 new PNGView(mojo::CreateApplicationConnector(app_impl()->shell()), 124 new PNGView(mojo::CreateApplicationConnector(app_impl()->shell()),
126 view_owner_request.Pass(), image_); 125 view_owner_request.Pass(), image_);
127 } 126 }
128 127
129 private: 128 private:
130 skia::RefPtr<SkImage> image_; 129 skia::RefPtr<SkImage> image_;
131 130
132 DISALLOW_COPY_AND_ASSIGN(PNGContentViewProviderApp); 131 DISALLOW_COPY_AND_ASSIGN(PNGContentViewProviderApp);
133 }; 132 };
134 133
(...skipping 24 matching lines...)
159 private: 158 private:
160 DISALLOW_COPY_AND_ASSIGN(PNGContentViewerApp); 159 DISALLOW_COPY_AND_ASSIGN(PNGContentViewerApp);
161 }; 160 };
162 161
163 } // namespace examples 162 } // namespace examples
164 163
165 MojoResult MojoMain(MojoHandle application_request) { 164 MojoResult MojoMain(MojoHandle application_request) {
166 mojo::ApplicationRunnerChromium runner(new examples::PNGContentViewerApp()); 165 mojo::ApplicationRunnerChromium runner(new examples::PNGContentViewerApp());
167 return runner.Run(application_request); 166 return runner.Run(application_request);
168 } 167 }
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