| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 : id(id), url(url), pid(base::kNullProcessId), name(name) {} | 84 : id(id), url(url), pid(base::kNullProcessId), name(name) {} |
| 85 | 85 |
| 86 uint32_t id; | 86 uint32_t id; |
| 87 std::string url; | 87 std::string url; |
| 88 base::ProcessId pid; | 88 base::ProcessId pid; |
| 89 std::string name; | 89 std::string name; |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 void AddListenerAndWaitForApplications() { | 92 void AddListenerAndWaitForApplications() { |
| 93 mojom::ApplicationManagerPtr application_manager; | 93 mojom::ApplicationManagerPtr application_manager; |
| 94 shell()->ConnectToService("mojo:shell", &application_manager); | 94 shell()->ConnectToInterface("mojo:shell", &application_manager); |
| 95 | 95 |
| 96 application_manager->AddListener(binding_.CreateInterfacePtrAndBind()); | 96 application_manager->AddListener(binding_.CreateInterfacePtrAndBind()); |
| 97 binding_.WaitForIncomingMethodCall(); | 97 binding_.WaitForIncomingMethodCall(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 bool ContainsApplicationNamed(const std::string& name) const { | 100 bool ContainsApplicationNamed(const std::string& name) const { |
| 101 for (const auto& application : initial_applications_) { | 101 for (const auto& application : initial_applications_) { |
| 102 if (application.name == name) | 102 if (application.name == name) |
| 103 return true; | 103 return true; |
| 104 } | 104 } |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 | 209 |
| 210 driver.set_connection_error_handler( | 210 driver.set_connection_error_handler( |
| 211 base::Bind(&ApplicationManagerAppTest::OnDriverQuit, | 211 base::Bind(&ApplicationManagerAppTest::OnDriverQuit, |
| 212 base::Unretained(this))); | 212 base::Unretained(this))); |
| 213 driver->QuitDriver(); | 213 driver->QuitDriver(); |
| 214 base::MessageLoop::current()->Run(); | 214 base::MessageLoop::current()->Run(); |
| 215 } | 215 } |
| 216 | 216 |
| 217 } // namespace shell | 217 } // namespace shell |
| 218 } // namespace mojo | 218 } // namespace mojo |
| OLD | NEW |