| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "content/public/test/test_mojo_app.h" | 5 #include "content/public/test/test_mojo_app.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "mojo/application/public/cpp/application_connection.h" | 8 #include "mojo/application/public/cpp/application_connection.h" |
| 9 #include "mojo/application/public/cpp/application_impl.h" | 9 #include "mojo/application/public/cpp/application_impl.h" |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 void TestMojoApp::Create(mojo::ApplicationConnection* connection, | 32 void TestMojoApp::Create(mojo::ApplicationConnection* connection, |
| 33 mojo::InterfaceRequest<TestMojoService> request) { | 33 mojo::InterfaceRequest<TestMojoService> request) { |
| 34 DCHECK(!service_binding_.is_bound()); | 34 DCHECK(!service_binding_.is_bound()); |
| 35 service_binding_.Bind(request.Pass()); | 35 service_binding_.Bind(request.Pass()); |
| 36 } | 36 } |
| 37 | 37 |
| 38 void TestMojoApp::DoSomething(const DoSomethingCallback& callback) { | 38 void TestMojoApp::DoSomething(const DoSomethingCallback& callback) { |
| 39 callback.Run(); | 39 callback.Run(); |
| 40 DCHECK(app_); | 40 DCHECK(app_); |
| 41 app_->Terminate(); | 41 app_->Quit(); |
| 42 } | 42 } |
| 43 | 43 |
| 44 void TestMojoApp::GetRequestorURL(const GetRequestorURLCallback& callback) { | 44 void TestMojoApp::GetRequestorURL(const GetRequestorURLCallback& callback) { |
| 45 callback.Run(requestor_url_.spec()); | 45 callback.Run(requestor_url_.spec()); |
| 46 } | 46 } |
| 47 | 47 |
| 48 } // namespace content | 48 } // namespace content |
| OLD | NEW |