| 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 "components/devtools_bridge/android/session_dependency_factory_android.
h" | 5 #include "components/devtools_bridge/android/session_dependency_factory_android.
h" |
| 6 | 6 |
| 7 #include "base/android/jni_string.h" | 7 #include "base/android/jni_string.h" |
| 8 #include "base/android/scoped_java_ref.h" | 8 #include "base/android/scoped_java_ref.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "components/devtools_bridge/abstract_data_channel.h" | 10 #include "components/devtools_bridge/abstract_data_channel.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 139 |
| 140 SessionDependencyFactoryAndroid::SessionDependencyFactoryAndroid() | 140 SessionDependencyFactoryAndroid::SessionDependencyFactoryAndroid() |
| 141 : impl_(SessionDependencyFactory::CreateInstance( | 141 : impl_(SessionDependencyFactory::CreateInstance( |
| 142 base::Bind(&CleanupOnSignalingThread))) { | 142 base::Bind(&CleanupOnSignalingThread))) { |
| 143 } | 143 } |
| 144 | 144 |
| 145 SessionDependencyFactoryAndroid::~SessionDependencyFactoryAndroid() { | 145 SessionDependencyFactoryAndroid::~SessionDependencyFactoryAndroid() { |
| 146 } | 146 } |
| 147 | 147 |
| 148 // static | 148 // static |
| 149 bool SessionDependencyFactoryAndroid::RegisterNatives(JNIEnv* env) { | 149 void SessionDependencyFactoryAndroid::RegisterNatives(JNIEnv* env) { |
| 150 return RegisterNativesImpl(env); | 150 RegisterNativesImpl(env); |
| 151 } | 151 } |
| 152 | 152 |
| 153 scoped_ptr<AbstractPeerConnection> | 153 scoped_ptr<AbstractPeerConnection> |
| 154 SessionDependencyFactoryAndroid::CreatePeerConnection( | 154 SessionDependencyFactoryAndroid::CreatePeerConnection( |
| 155 scoped_ptr<RTCConfiguration> config, | 155 scoped_ptr<RTCConfiguration> config, |
| 156 scoped_ptr<AbstractPeerConnection::Delegate> delegate) { | 156 scoped_ptr<AbstractPeerConnection::Delegate> delegate) { |
| 157 return impl_->CreatePeerConnection(config.Pass(), delegate.Pass()); | 157 return impl_->CreatePeerConnection(config.Pass(), delegate.Pass()); |
| 158 } | 158 } |
| 159 | 159 |
| 160 scoped_refptr<base::TaskRunner> | 160 scoped_refptr<base::TaskRunner> |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 ConvertJavaStringToUTF8(env, socket_name))); | 295 ConvertJavaStringToUTF8(env, socket_name))); |
| 296 } | 296 } |
| 297 | 297 |
| 298 static void DestroySocketTunnelServer( | 298 static void DestroySocketTunnelServer( |
| 299 JNIEnv* env, jclass jcaller, jlong tunnel_ptr) { | 299 JNIEnv* env, jclass jcaller, jlong tunnel_ptr) { |
| 300 delete reinterpret_cast<SocketTunnelServer*>(tunnel_ptr); | 300 delete reinterpret_cast<SocketTunnelServer*>(tunnel_ptr); |
| 301 } | 301 } |
| 302 | 302 |
| 303 } // namespace android | 303 } // namespace android |
| 304 } // namespace devtools_bridge | 304 } // namespace devtools_bridge |
| OLD | NEW |