| 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 <iostream> | 5 #include <iostream> |
| 6 #include "base/bind.h" | 6 #include "base/bind.h" |
| 7 #include "base/memory/weak_ptr.h" | 7 #include "base/memory/weak_ptr.h" |
| 8 #include "mojo/application/application_runner_chromium.h" | 8 #include "mojo/application/application_runner_chromium.h" |
| 9 #include "mojo/public/c/system/main.h" | 9 #include "mojo/public/c/system/main.h" |
| 10 #include "mojo/public/cpp/application/application_delegate.h" | 10 #include "mojo/public/cpp/application/application_delegate.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 69 private: | 69 private: |
| 70 // Overridden from mojo::ApplicationDelegate: | 70 // Overridden from mojo::ApplicationDelegate: |
| 71 virtual void Initialize(mojo::ApplicationImpl* impl) override { | 71 virtual void Initialize(mojo::ApplicationImpl* impl) override { |
| 72 window_manager_app_->Initialize(impl); | 72 window_manager_app_->Initialize(impl); |
| 73 | 73 |
| 74 if (impl->args().size() >= 2) | 74 if (impl->args().size() >= 2) |
| 75 url_from_args_ = impl->args()[1]; | 75 url_from_args_ = impl->args()[1]; |
| 76 } | 76 } |
| 77 virtual bool ConfigureIncomingConnection( | 77 virtual bool ConfigureIncomingConnection( |
| 78 mojo::ApplicationConnection* connection) override { | 78 mojo::ApplicationConnection* connection, |
| 79 window_manager_app_->ConfigureIncomingConnection(connection); | 79 const std::string& url) override { |
| 80 window_manager_app_->ConfigureIncomingConnection(connection, url); |
| 80 if (test_runner_) | 81 if (test_runner_) |
| 81 connection->AddService(test_runner_.get()); | 82 connection->AddService(test_runner_.get()); |
| 82 return true; | 83 return true; |
| 83 } | 84 } |
| 84 | 85 |
| 85 // Overridden from mojo::ViewManagerDelegate: | 86 // Overridden from mojo::ViewManagerDelegate: |
| 86 virtual void OnEmbed(mojo::View* root, | 87 virtual void OnEmbed(mojo::View* root, |
| 87 mojo::InterfaceRequest<mojo::ServiceProvider> services, | 88 mojo::InterfaceRequest<mojo::ServiceProvider> services, |
| 88 mojo::ServiceProviderPtr exposed_services) override { | 89 mojo::ServiceProviderPtr exposed_services) override { |
| 89 root_ = root; | 90 root_ = root; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 DISALLOW_COPY_AND_ASSIGN(SkyTester); | 164 DISALLOW_COPY_AND_ASSIGN(SkyTester); |
| 164 }; | 165 }; |
| 165 | 166 |
| 166 } // namespace tester | 167 } // namespace tester |
| 167 } // namespace examples | 168 } // namespace examples |
| 168 | 169 |
| 169 MojoResult MojoMain(MojoHandle shell_handle) { | 170 MojoResult MojoMain(MojoHandle shell_handle) { |
| 170 mojo::ApplicationRunnerChromium runner(new sky::tester::SkyTester); | 171 mojo::ApplicationRunnerChromium runner(new sky::tester::SkyTester); |
| 171 return runner.Run(shell_handle); | 172 return runner.Run(shell_handle); |
| 172 } | 173 } |
| OLD | NEW |