| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <unistd.h> | 5 #include <unistd.h> |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 }; | 202 }; |
| 203 | 203 |
| 204 class JankApp : public mojo::ui::ViewProviderApp { | 204 class JankApp : public mojo::ui::ViewProviderApp { |
| 205 public: | 205 public: |
| 206 JankApp() {} | 206 JankApp() {} |
| 207 ~JankApp() override {} | 207 ~JankApp() override {} |
| 208 | 208 |
| 209 void CreateView( | 209 void CreateView( |
| 210 const std::string& connection_url, | 210 const std::string& connection_url, |
| 211 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request, | 211 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request, |
| 212 mojo::InterfaceRequest<mojo::ServiceProvider> services, | 212 mojo::InterfaceRequest<mojo::ServiceProvider> services) override { |
| 213 mojo::InterfaceHandle<mojo::ServiceProvider> exposed_services) override { | |
| 214 new JankView(mojo::CreateApplicationConnector(app_impl()->shell()), | 213 new JankView(mojo::CreateApplicationConnector(app_impl()->shell()), |
| 215 view_owner_request.Pass()); | 214 view_owner_request.Pass()); |
| 216 } | 215 } |
| 217 | 216 |
| 218 private: | 217 private: |
| 219 DISALLOW_COPY_AND_ASSIGN(JankApp); | 218 DISALLOW_COPY_AND_ASSIGN(JankApp); |
| 220 }; | 219 }; |
| 221 | 220 |
| 222 } // namespace examples | 221 } // namespace examples |
| 223 | 222 |
| 224 MojoResult MojoMain(MojoHandle application_request) { | 223 MojoResult MojoMain(MojoHandle application_request) { |
| 225 mojo::ApplicationRunnerChromium runner(new examples::JankApp()); | 224 mojo::ApplicationRunnerChromium runner(new examples::JankApp()); |
| 226 return runner.Run(application_request); | 225 return runner.Run(application_request); |
| 227 } | 226 } |
| OLD | NEW |