| 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 <utility> |
| 6 |
| 5 #include "base/bind.h" | 7 #include "base/bind.h" |
| 6 #include "base/macros.h" | 8 #include "base/macros.h" |
| 7 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 8 #include "mojo/application/public/cpp/application_impl.h" | 10 #include "mojo/application/public/cpp/application_impl.h" |
| 9 #include "mojo/application/public/cpp/application_test_base.h" | 11 #include "mojo/application/public/cpp/application_test_base.h" |
| 10 #include "mojo/application/public/cpp/interface_factory.h" | 12 #include "mojo/application/public/cpp/interface_factory.h" |
| 11 #include "mojo/application/public/interfaces/application_manager.mojom.h" | 13 #include "mojo/application/public/interfaces/application_manager.mojom.h" |
| 12 #include "mojo/converters/network/network_type_converters.h" | 14 #include "mojo/converters/network/network_type_converters.h" |
| 13 #include "mojo/shell/application_manager_apptests.mojom.h" | 15 #include "mojo/shell/application_manager_apptests.mojom.h" |
| 14 | 16 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 33 void Initialize(ApplicationImpl* app) override {} | 35 void Initialize(ApplicationImpl* app) override {} |
| 34 bool ConfigureIncomingConnection(ApplicationConnection* connection) override { | 36 bool ConfigureIncomingConnection(ApplicationConnection* connection) override { |
| 35 connection->AddService<CreateInstanceForHandleTest>(this); | 37 connection->AddService<CreateInstanceForHandleTest>(this); |
| 36 return true; | 38 return true; |
| 37 } | 39 } |
| 38 | 40 |
| 39 // InterfaceFactory<CreateInstanceForHandleTest>: | 41 // InterfaceFactory<CreateInstanceForHandleTest>: |
| 40 void Create( | 42 void Create( |
| 41 ApplicationConnection* connection, | 43 ApplicationConnection* connection, |
| 42 InterfaceRequest<CreateInstanceForHandleTest> request) override { | 44 InterfaceRequest<CreateInstanceForHandleTest> request) override { |
| 43 binding_.Bind(request.Pass()); | 45 binding_.Bind(std::move(request)); |
| 44 } | 46 } |
| 45 | 47 |
| 46 // CreateInstanceForHandleTest: | 48 // CreateInstanceForHandleTest: |
| 47 void Ping(const String& data) override { | 49 void Ping(const String& data) override { |
| 48 data_ = data; | 50 data_ = data; |
| 49 base::MessageLoop::current()->QuitWhenIdle(); | 51 base::MessageLoop::current()->QuitWhenIdle(); |
| 50 } | 52 } |
| 51 | 53 |
| 52 std::string data_; | 54 std::string data_; |
| 53 | 55 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 | 153 |
| 152 TEST_F(GetRunningApplicationInfoAppTest, GetRunningApplicationInfo) { | 154 TEST_F(GetRunningApplicationInfoAppTest, GetRunningApplicationInfo) { |
| 153 QueryApplications(); | 155 QueryApplications(); |
| 154 EXPECT_TRUE(Contains("mojo://mojo_shell_apptests/")); | 156 EXPECT_TRUE(Contains("mojo://mojo_shell_apptests/")); |
| 155 EXPECT_TRUE(Contains("mojo://shell/")); | 157 EXPECT_TRUE(Contains("mojo://shell/")); |
| 156 EXPECT_TRUE(Contains("mojo://tracing/")); | 158 EXPECT_TRUE(Contains("mojo://tracing/")); |
| 157 } | 159 } |
| 158 | 160 |
| 159 } // namespace shell | 161 } // namespace shell |
| 160 } // namespace mojo | 162 } // namespace mojo |
| OLD | NEW |