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