| 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 "content/shell/browser/shell_mojo_test_utils_android.h" | 5 #include "content/shell/browser/shell_mojo_test_utils_android.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| 11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
| 13 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
| 14 #include "base/threading/thread_task_runner_handle.h" | 14 #include "base/threading/thread_task_runner_handle.h" |
| 15 #include "content/public/browser/android/interface_provider_android.h" | 15 #include "content/public/browser/android/interface_provider_android.h" |
| 16 #include "content/public/browser/android/interface_registry_android.h" | 16 #include "content/public/browser/android/interface_registry_android.h" |
| 17 #include "jni/ShellMojoTestUtils_jni.h" | 17 #include "jni/ShellMojoTestUtils_jni.h" |
| 18 #include "services/shell/public/cpp/interface_provider.h" | 18 #include "services/shell/public/cpp/interface_provider.h" |
| 19 #include "services/shell/public/cpp/interface_registry.h" | 19 #include "services/shell/public/cpp/interface_registry.h" |
| 20 | 20 |
| 21 using base::android::JavaParamRef; |
| 22 using base::android::ScopedJavaLocalRef; |
| 23 |
| 21 namespace { | 24 namespace { |
| 22 | 25 |
| 23 struct TestEnvironment { | 26 struct TestEnvironment { |
| 24 base::MessageLoop message_loop; | 27 base::MessageLoop message_loop; |
| 25 std::vector<std::unique_ptr<shell::InterfaceRegistry>> registries; | 28 std::vector<std::unique_ptr<shell::InterfaceRegistry>> registries; |
| 26 std::vector<std::unique_ptr<shell::InterfaceProvider>> providers; | 29 std::vector<std::unique_ptr<shell::InterfaceProvider>> providers; |
| 27 std::vector<std::unique_ptr<content::InterfaceRegistryAndroid>> | 30 std::vector<std::unique_ptr<content::InterfaceRegistryAndroid>> |
| 28 registry_wrappers; | 31 registry_wrappers; |
| 29 std::vector<std::unique_ptr<content::InterfaceProviderAndroid>> | 32 std::vector<std::unique_ptr<content::InterfaceProviderAndroid>> |
| 30 provider_wrappers; | 33 provider_wrappers; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 base::TimeDelta::FromMilliseconds(timeout_ms)); | 90 base::TimeDelta::FromMilliseconds(timeout_ms)); |
| 88 base::RunLoop run_loop; | 91 base::RunLoop run_loop; |
| 89 run_loop.Run(); | 92 run_loop.Run(); |
| 90 } | 93 } |
| 91 | 94 |
| 92 bool RegisterShellMojoTestUtils(JNIEnv* env) { | 95 bool RegisterShellMojoTestUtils(JNIEnv* env) { |
| 93 return RegisterNativesImpl(env); | 96 return RegisterNativesImpl(env); |
| 94 } | 97 } |
| 95 | 98 |
| 96 } // namespace content | 99 } // namespace content |
| OLD | NEW |