Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: components/devtools_bridge/android/session_dependency_factory_native.cc

Issue 704613003: Beginning implementation of SessionDependencyFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
mnaganov (inactive) 2014/11/05 22:38:49 nit: remove "(c)"
SeRya 2014/11/06 06:42:45 Done.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/devtools_bridge/android/session_dependency_factory_native.h "
6 #include "jni/SessionDependencyFactoryNative_jni.h"
7 #include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h "
8
9 namespace devtools_bridge {
10 namespace android {
mnaganov (inactive) 2014/11/05 22:38:49 nit: please add an empty line before the anonymous
SeRya 2014/11/06 06:42:45 Done.
11 namespace {
12 void CheckedRelease(rtc::RefCountInterface* ptr) {
13 CHECK_EQ(0, ptr->Release());
14 }
15 } // namespace
16
17 SessionDependencyFactoryNative::SessionDependencyFactoryNative()
18 : factory_(webrtc::CreatePeerConnectionFactory().release()) {
19 }
20
21 SessionDependencyFactoryNative::~SessionDependencyFactoryNative() {
22 CheckedRelease(factory_);
23 }
24
25 // static
26 void SessionDependencyFactoryNative::RegisterNatives(JNIEnv* env) {
27 RegisterNativesImpl(env);
28 }
29
30 static jlong CreateFactory(JNIEnv* env, jclass jcaller) {
31 return reinterpret_cast<jlong>(new SessionDependencyFactoryNative());
mnaganov (inactive) 2014/11/05 22:38:49 nit: wrong indentation
SeRya 2014/11/06 06:42:45 Done.
32 }
33
34 static void DestroyFactory(JNIEnv* env, jclass jcaller, jlong ptr) {
35 delete SessionDependencyFactoryNative::cast(ptr);
mnaganov (inactive) 2014/11/05 22:38:49 nit: wrong indentation
SeRya 2014/11/06 06:42:46 Done.
36 }
37
38 } // namespace android
39 } // namespace devtools_bridge
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698