Move talk/app/webrtc to webrtc/api

The previously disabled warnings that were inherited from
talk/build/common.gypi are now replaced by target-specific disabling
of only the failing warnings. Additional disabling was needed since the stricter
compilation warnings that applies to code in webrtc/.

License headers will be updated in a follow-up CL.

Other modifications:
* Updated the header guards.
* Sorted the includes using chromium/src/tools/sort-headers.py
  except for these files:
  talk/app/webrtc/peerconnectionendtoend_unittest.cc
  talk/app/webrtc/java/jni/androidmediadecoder_jni.cc
  talk/app/webrtc/java/jni/androidmediaencoder_jni.cc
  webrtc/media/devices/win32devicemanager.cc

The HAVE_SCTP define was added for the peerconnection_unittests target
in api_tests.gyp.

I also checked that none of
SRTP_RELATIVE_PATH
HAVE_SRTP
HAVE_WEBRTC_VIDEO
HAVE_WEBRTC_VOICE
were used by the talk/app/webrtc code.

For Chromium, the following changes will need to be applied to the roll CL that updates the
DEPS for WebRTC and libjingle:
https://codereview.chromium.org/1615433002

BUG=webrtc:5418
NOPRESUBMIT=True
R=deadbeef@webrtc.org, pthatcher@webrtc.org, tommi@webrtc.org

Review URL: https://codereview.webrtc.org/1610243002 .

Cr-Commit-Position: refs/heads/master@{#11545}
diff --git a/talk/app/webrtc/OWNERS b/talk/app/webrtc/OWNERS
deleted file mode 100644
index 20a1fdf..0000000
--- a/talk/app/webrtc/OWNERS
+++ /dev/null
@@ -1,5 +0,0 @@
-glaznev@webrtc.org
-juberti@webrtc.org
-perkj@webrtc.org
-tkchin@webrtc.org
-tommi@webrtc.org
diff --git a/talk/app/webrtc/objc/RTCAudioTrack+Internal.h b/talk/app/webrtc/objc/RTCAudioTrack+Internal.h
index 3d2a983..1ca2b8f 100644
--- a/talk/app/webrtc/objc/RTCAudioTrack+Internal.h
+++ b/talk/app/webrtc/objc/RTCAudioTrack+Internal.h
@@ -27,7 +27,7 @@
 
 #import "RTCAudioTrack.h"
 
-#include "talk/app/webrtc/mediastreaminterface.h"
+#include "webrtc/api/mediastreaminterface.h"
 
 @interface RTCAudioTrack (Internal)
 
diff --git a/talk/app/webrtc/objc/RTCDataChannel+Internal.h b/talk/app/webrtc/objc/RTCDataChannel+Internal.h
index 78063f4..9e23b7b 100644
--- a/talk/app/webrtc/objc/RTCDataChannel+Internal.h
+++ b/talk/app/webrtc/objc/RTCDataChannel+Internal.h
@@ -27,7 +27,7 @@
 
 #import "RTCDataChannel.h"
 
-#include "talk/app/webrtc/datachannelinterface.h"
+#include "webrtc/api/datachannelinterface.h"
 #include "webrtc/base/scoped_ref_ptr.h"
 
 @interface RTCDataBuffer (Internal)
diff --git a/talk/app/webrtc/objc/RTCDataChannel.mm b/talk/app/webrtc/objc/RTCDataChannel.mm
index fdb5c99a..ef45fbe 100644
--- a/talk/app/webrtc/objc/RTCDataChannel.mm
+++ b/talk/app/webrtc/objc/RTCDataChannel.mm
@@ -31,7 +31,7 @@
 
 #import "RTCDataChannel+Internal.h"
 
-#include "talk/app/webrtc/datachannelinterface.h"
+#include "webrtc/api/datachannelinterface.h"
 
 namespace webrtc {
 
diff --git a/talk/app/webrtc/objc/RTCEnumConverter.mm b/talk/app/webrtc/objc/RTCEnumConverter.mm
index fa4608a..f8ab838 100644
--- a/talk/app/webrtc/objc/RTCEnumConverter.mm
+++ b/talk/app/webrtc/objc/RTCEnumConverter.mm
@@ -27,7 +27,7 @@
 
 #import "RTCEnumConverter.h"
 
-#include "talk/app/webrtc/peerconnectioninterface.h"
+#include "webrtc/api/peerconnectioninterface.h"
 
 @implementation RTCEnumConverter
 
diff --git a/talk/app/webrtc/objc/RTCICECandidate+Internal.h b/talk/app/webrtc/objc/RTCICECandidate+Internal.h
index 7c35cea..f5b226f 100644
--- a/talk/app/webrtc/objc/RTCICECandidate+Internal.h
+++ b/talk/app/webrtc/objc/RTCICECandidate+Internal.h
@@ -27,7 +27,7 @@
 
 #import "RTCICECandidate.h"
 
-#include "talk/app/webrtc/peerconnectioninterface.h"
+#include "webrtc/api/peerconnectioninterface.h"
 
 @interface RTCICECandidate (Internal)
 
diff --git a/talk/app/webrtc/objc/RTCICEServer+Internal.h b/talk/app/webrtc/objc/RTCICEServer+Internal.h
index 1bbe864..92c4816 100644
--- a/talk/app/webrtc/objc/RTCICEServer+Internal.h
+++ b/talk/app/webrtc/objc/RTCICEServer+Internal.h
@@ -27,7 +27,7 @@
 
 #import "RTCICEServer.h"
 
-#include "talk/app/webrtc/peerconnectioninterface.h"
+#include "webrtc/api/peerconnectioninterface.h"
 
 @interface RTCICEServer (Internal)
 
diff --git a/talk/app/webrtc/objc/RTCMediaConstraints+Internal.h b/talk/app/webrtc/objc/RTCMediaConstraints+Internal.h
index ac52a8f..8b03d89 100644
--- a/talk/app/webrtc/objc/RTCMediaConstraints+Internal.h
+++ b/talk/app/webrtc/objc/RTCMediaConstraints+Internal.h
@@ -29,7 +29,7 @@
 
 #import "RTCMediaConstraintsNative.h"
 
-#include "talk/app/webrtc/mediastreaminterface.h"
+#include "webrtc/api/mediastreaminterface.h"
 
 @interface RTCMediaConstraints (Internal)
 
diff --git a/talk/app/webrtc/objc/RTCMediaConstraintsNative.h b/talk/app/webrtc/objc/RTCMediaConstraintsNative.h
index 558f2ec5..6948465 100644
--- a/talk/app/webrtc/objc/RTCMediaConstraintsNative.h
+++ b/talk/app/webrtc/objc/RTCMediaConstraintsNative.h
@@ -28,7 +28,7 @@
 #ifndef TALK_APP_WEBRTC_OBJC_RTCMEDIACONSTRAINTSNATIVE_H_
 #define TALK_APP_WEBRTC_OBJC_RTCMEDIACONSTRAINTSNATIVE_H_
 
-#include "talk/app/webrtc/mediaconstraintsinterface.h"
+#include "webrtc/api/mediaconstraintsinterface.h"
 
 namespace webrtc {
 class RTCMediaConstraintsNative : public MediaConstraintsInterface {
diff --git a/talk/app/webrtc/objc/RTCMediaSource+Internal.h b/talk/app/webrtc/objc/RTCMediaSource+Internal.h
index f60dc61..2620cfd 100644
--- a/talk/app/webrtc/objc/RTCMediaSource+Internal.h
+++ b/talk/app/webrtc/objc/RTCMediaSource+Internal.h
@@ -27,7 +27,7 @@
 
 #import "RTCMediaSource.h"
 
-#include "talk/app/webrtc/mediastreaminterface.h"
+#include "webrtc/api/mediastreaminterface.h"
 
 @interface RTCMediaSource (Internal)
 
diff --git a/talk/app/webrtc/objc/RTCMediaStream+Internal.h b/talk/app/webrtc/objc/RTCMediaStream+Internal.h
index c5e2d78..2f17a17 100644
--- a/talk/app/webrtc/objc/RTCMediaStream+Internal.h
+++ b/talk/app/webrtc/objc/RTCMediaStream+Internal.h
@@ -27,7 +27,7 @@
 
 #import "RTCMediaStream.h"
 
-#include "talk/app/webrtc/mediastreamtrack.h"
+#include "webrtc/api/mediastreamtrack.h"
 
 @interface RTCMediaStream (Internal)
 
diff --git a/talk/app/webrtc/objc/RTCMediaStream.mm b/talk/app/webrtc/objc/RTCMediaStream.mm
index 87f838d..543a569 100644
--- a/talk/app/webrtc/objc/RTCMediaStream.mm
+++ b/talk/app/webrtc/objc/RTCMediaStream.mm
@@ -35,7 +35,7 @@
 #import "RTCMediaStreamTrack+Internal.h"
 #import "RTCVideoTrack+Internal.h"
 
-#include "talk/app/webrtc/mediastreaminterface.h"
+#include "webrtc/api/mediastreaminterface.h"
 
 @implementation RTCMediaStream {
   NSMutableArray* _audioTracks;
diff --git a/talk/app/webrtc/objc/RTCMediaStreamTrack+Internal.h b/talk/app/webrtc/objc/RTCMediaStreamTrack+Internal.h
index e5383fe..88c83ff 100644
--- a/talk/app/webrtc/objc/RTCMediaStreamTrack+Internal.h
+++ b/talk/app/webrtc/objc/RTCMediaStreamTrack+Internal.h
@@ -27,7 +27,7 @@
 
 #import "RTCMediaStreamTrack.h"
 
-#include "talk/app/webrtc/mediastreaminterface.h"
+#include "webrtc/api/mediastreaminterface.h"
 
 @interface RTCMediaStreamTrack (Internal)
 
diff --git a/talk/app/webrtc/objc/RTCPeerConnection+Internal.h b/talk/app/webrtc/objc/RTCPeerConnection+Internal.h
index 96d63ab..136fdf5 100644
--- a/talk/app/webrtc/objc/RTCPeerConnection+Internal.h
+++ b/talk/app/webrtc/objc/RTCPeerConnection+Internal.h
@@ -29,7 +29,7 @@
 
 #import "RTCPeerConnectionDelegate.h"
 
-#include "talk/app/webrtc/peerconnectioninterface.h"
+#include "webrtc/api/peerconnectioninterface.h"
 
 @interface RTCPeerConnection (Internal)
 
diff --git a/talk/app/webrtc/objc/RTCPeerConnection.mm b/talk/app/webrtc/objc/RTCPeerConnection.mm
index f814f06..0ec6181 100644
--- a/talk/app/webrtc/objc/RTCPeerConnection.mm
+++ b/talk/app/webrtc/objc/RTCPeerConnection.mm
@@ -45,7 +45,7 @@
 #import "RTCStatsDelegate.h"
 #import "RTCStatsReport+Internal.h"
 
-#include "talk/app/webrtc/jsep.h"
+#include "webrtc/api/jsep.h"
 
 NSString* const kRTCSessionDescriptionDelegateErrorDomain = @"RTCSDPError";
 int const kRTCSessionDescriptionDelegateErrorCode = -1;
diff --git a/talk/app/webrtc/objc/RTCPeerConnectionFactory+Internal.h b/talk/app/webrtc/objc/RTCPeerConnectionFactory+Internal.h
index 5d6fa12..d7dd3e5 100644
--- a/talk/app/webrtc/objc/RTCPeerConnectionFactory+Internal.h
+++ b/talk/app/webrtc/objc/RTCPeerConnectionFactory+Internal.h
@@ -27,7 +27,7 @@
 
 #import "RTCPeerConnectionFactory.h"
 
-#include "talk/app/webrtc/peerconnectionfactory.h"
+#include "webrtc/api/peerconnectionfactory.h"
 #include "webrtc/base/scoped_ptr.h"
 
 @interface RTCPeerConnectionFactory ()
diff --git a/talk/app/webrtc/objc/RTCPeerConnectionFactory.mm b/talk/app/webrtc/objc/RTCPeerConnectionFactory.mm
index b7b8966..3393eca 100644
--- a/talk/app/webrtc/objc/RTCPeerConnectionFactory.mm
+++ b/talk/app/webrtc/objc/RTCPeerConnectionFactory.mm
@@ -46,11 +46,11 @@
 #import "RTCVideoSource+Internal.h"
 #import "RTCVideoTrack+Internal.h"
 
-#include "talk/app/webrtc/audiotrack.h"
-#include "talk/app/webrtc/mediastreaminterface.h"
-#include "talk/app/webrtc/peerconnectioninterface.h"
-#include "talk/app/webrtc/videosourceinterface.h"
-#include "talk/app/webrtc/videotrack.h"
+#include "webrtc/api/audiotrack.h"
+#include "webrtc/api/mediastreaminterface.h"
+#include "webrtc/api/peerconnectioninterface.h"
+#include "webrtc/api/videosourceinterface.h"
+#include "webrtc/api/videotrack.h"
 #include "webrtc/base/logging.h"
 #include "webrtc/base/ssladapter.h"
 
diff --git a/talk/app/webrtc/objc/RTCPeerConnectionInterface+Internal.h b/talk/app/webrtc/objc/RTCPeerConnectionInterface+Internal.h
index 5e8dbbf..ffa01c6 100644
--- a/talk/app/webrtc/objc/RTCPeerConnectionInterface+Internal.h
+++ b/talk/app/webrtc/objc/RTCPeerConnectionInterface+Internal.h
@@ -27,7 +27,7 @@
 
 #import "talk/app/webrtc/objc/public/RTCPeerConnectionInterface.h"
 
-#include "talk/app/webrtc/peerconnectioninterface.h"
+#include "webrtc/api/peerconnectioninterface.h"
 
 @interface RTCConfiguration ()
 
diff --git a/talk/app/webrtc/objc/RTCPeerConnectionObserver.h b/talk/app/webrtc/objc/RTCPeerConnectionObserver.h
index 9b981b9..0ac37b9 100644
--- a/talk/app/webrtc/objc/RTCPeerConnectionObserver.h
+++ b/talk/app/webrtc/objc/RTCPeerConnectionObserver.h
@@ -25,7 +25,7 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/peerconnectioninterface.h"
+#include "webrtc/api/peerconnectioninterface.h"
 
 #import "RTCPeerConnection.h"
 #import "RTCPeerConnectionDelegate.h"
diff --git a/talk/app/webrtc/objc/RTCSessionDescription+Internal.h b/talk/app/webrtc/objc/RTCSessionDescription+Internal.h
index 662c538..d552af1 100644
--- a/talk/app/webrtc/objc/RTCSessionDescription+Internal.h
+++ b/talk/app/webrtc/objc/RTCSessionDescription+Internal.h
@@ -27,8 +27,8 @@
 
 #import "RTCSessionDescription.h"
 
-#include "talk/app/webrtc/jsep.h"
-#include "talk/app/webrtc/webrtcsession.h"
+#include "webrtc/api/jsep.h"
+#include "webrtc/api/webrtcsession.h"
 
 @interface RTCSessionDescription (Internal)
 
diff --git a/talk/app/webrtc/objc/RTCStatsReport+Internal.h b/talk/app/webrtc/objc/RTCStatsReport+Internal.h
index 7a41246..a595cfd 100644
--- a/talk/app/webrtc/objc/RTCStatsReport+Internal.h
+++ b/talk/app/webrtc/objc/RTCStatsReport+Internal.h
@@ -27,7 +27,7 @@
 
 #import "RTCStatsReport.h"
 
-#include "talk/app/webrtc/statstypes.h"
+#include "webrtc/api/statstypes.h"
 
 @interface RTCStatsReport (Internal)
 
diff --git a/talk/app/webrtc/objc/RTCVideoCapturer+Internal.h b/talk/app/webrtc/objc/RTCVideoCapturer+Internal.h
index 10a72e2..37b2452 100644
--- a/talk/app/webrtc/objc/RTCVideoCapturer+Internal.h
+++ b/talk/app/webrtc/objc/RTCVideoCapturer+Internal.h
@@ -27,7 +27,7 @@
 
 #import "RTCVideoCapturer.h"
 
-#include "talk/app/webrtc/videosourceinterface.h"
+#include "webrtc/api/videosourceinterface.h"
 
 @interface RTCVideoCapturer (Internal)
 
diff --git a/talk/app/webrtc/objc/RTCVideoRendererAdapter.h b/talk/app/webrtc/objc/RTCVideoRendererAdapter.h
index 20a4cf1..7719860 100644
--- a/talk/app/webrtc/objc/RTCVideoRendererAdapter.h
+++ b/talk/app/webrtc/objc/RTCVideoRendererAdapter.h
@@ -27,7 +27,7 @@
 
 #import "RTCVideoRenderer.h"
 
-#include "talk/app/webrtc/mediastreaminterface.h"
+#include "webrtc/api/mediastreaminterface.h"
 
 @interface RTCVideoRendererAdapter : NSObject
 
diff --git a/talk/app/webrtc/objc/RTCVideoRendererAdapter.mm b/talk/app/webrtc/objc/RTCVideoRendererAdapter.mm
index cefd567..e601420 100644
--- a/talk/app/webrtc/objc/RTCVideoRendererAdapter.mm
+++ b/talk/app/webrtc/objc/RTCVideoRendererAdapter.mm
@@ -29,8 +29,8 @@
 #error "This file requires ARC support."
 #endif
 
-#import "RTCVideoRendererAdapter.h"
 #import "RTCI420Frame+Internal.h"
+#import "RTCVideoRendererAdapter.h"
 
 namespace webrtc {
 
diff --git a/talk/app/webrtc/objc/RTCVideoSource+Internal.h b/talk/app/webrtc/objc/RTCVideoSource+Internal.h
index c6c4a20..a13e71e 100644
--- a/talk/app/webrtc/objc/RTCVideoSource+Internal.h
+++ b/talk/app/webrtc/objc/RTCVideoSource+Internal.h
@@ -27,7 +27,7 @@
 
 #import "RTCVideoSource.h"
 
-#include "talk/app/webrtc/videosourceinterface.h"
+#include "webrtc/api/videosourceinterface.h"
 
 @interface RTCVideoSource (Internal)
 
diff --git a/talk/app/webrtc/objc/RTCVideoTrack+Internal.h b/talk/app/webrtc/objc/RTCVideoTrack+Internal.h
index c9ec382..84259ea 100644
--- a/talk/app/webrtc/objc/RTCVideoTrack+Internal.h
+++ b/talk/app/webrtc/objc/RTCVideoTrack+Internal.h
@@ -27,8 +27,8 @@
 
 #import "RTCVideoTrack.h"
 
-#include "talk/app/webrtc/mediastreaminterface.h"
-#include "talk/app/webrtc/peerconnectioninterface.h"
+#include "webrtc/api/mediastreaminterface.h"
+#include "webrtc/api/peerconnectioninterface.h"
 
 @class RTCVideoRenderer;
 
diff --git a/talk/app/webrtc/objc/RTCVideoTrack.mm b/talk/app/webrtc/objc/RTCVideoTrack.mm
index 24e5eda..e7d9f52 100644
--- a/talk/app/webrtc/objc/RTCVideoTrack.mm
+++ b/talk/app/webrtc/objc/RTCVideoTrack.mm
@@ -31,10 +31,10 @@
 
 #import "RTCVideoTrack+Internal.h"
 
+#import "RTCMediaSource+Internal.h"
 #import "RTCMediaStreamTrack+Internal.h"
 #import "RTCPeerConnectionFactory+Internal.h"
 #import "RTCVideoRendererAdapter.h"
-#import "RTCMediaSource+Internal.h"
 #import "RTCVideoSource+Internal.h"
 
 @implementation RTCVideoTrack {
diff --git a/talk/app/webrtc/portallocatorfactory.h b/talk/app/webrtc/portallocatorfactory.h
deleted file mode 100644
index bb6cf47..0000000
--- a/talk/app/webrtc/portallocatorfactory.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * libjingle
- * Copyright 2011 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *  1. Redistributions of source code must retain the above copyright notice,
- *     this list of conditions and the following disclaimer.
- *  2. Redistributions in binary form must reproduce the above copyright notice,
- *     this list of conditions and the following disclaimer in the documentation
- *     and/or other materials provided with the distribution.
- *  3. The name of the author may not be used to endorse or promote products
- *     derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-// TODO(deadbeef): Remove this file once chromium build files no longer
-// reference it.
-
-#ifndef TALK_APP_WEBRTC_PORTALLOCATORFACTORY_H_
-#define TALK_APP_WEBRTC_PORTALLOCATORFACTORY_H_
-
-#endif  // TALK_APP_WEBRTC_PORTALLOCATORFACTORY_H_
diff --git a/talk/build/common.gypi b/talk/build/common.gypi
index 028c006..6da1449 100644
--- a/talk/build/common.gypi
+++ b/talk/build/common.gypi
@@ -33,11 +33,6 @@
     # TODO(ronghuawu): For now, disable the Chrome plugins, which causes a
     # flood of chromium-style warnings.
     'clang_use_chrome_plugins%': 0,
-    'conditions': [
-      ['OS=="android" or OS=="linux"', {
-        'java_home%': '<!(python -c "import os; dir=os.getenv(\'JAVA_HOME\', \'/usr/lib/jvm/java-7-openjdk-amd64\'); assert os.path.exists(os.path.join(dir, \'include/jni.h\')), \'Point \\$JAVA_HOME or the java_home gyp variable to a directory containing include/jni.h!\'; print dir")',
-      }],
-    ],
     # Disable these to not build components which can be externally provided.
     'build_expat%': 1,
     'build_json%': 1,
diff --git a/talk/libjingle.gyp b/talk/libjingle.gyp
index 12b4a03..09daed7 100755
--- a/talk/libjingle.gyp
+++ b/talk/libjingle.gyp
@@ -27,113 +27,6 @@
 {
   'includes': ['build/common.gypi'],
   'conditions': [
-    ['os_posix == 1 and OS != "mac" and OS != "ios"', {
-     'conditions': [
-       ['sysroot!=""', {
-         'variables': {
-           'pkg-config': '../../../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
-         },
-       }, {
-         'variables': {
-           'pkg-config': 'pkg-config'
-         },
-       }],
-     ],
-    }],
-    ['OS=="android"', {
-      'targets': [
-        {
-          'target_name': 'libjingle_peerconnection_jni',
-          'type': 'static_library',
-          'dependencies': [
-            '<(webrtc_root)/system_wrappers/system_wrappers.gyp:field_trial_default',
-            'libjingle_peerconnection',
-          ],
-          'sources': [
-            'app/webrtc/androidvideocapturer.cc',
-            'app/webrtc/androidvideocapturer.h',
-            'app/webrtc/java/jni/androidmediacodeccommon.h',
-            'app/webrtc/java/jni/androidmediadecoder_jni.cc',
-            'app/webrtc/java/jni/androidmediadecoder_jni.h',
-            'app/webrtc/java/jni/androidmediaencoder_jni.cc',
-            'app/webrtc/java/jni/androidmediaencoder_jni.h',
-            'app/webrtc/java/jni/androidnetworkmonitor_jni.cc',
-            'app/webrtc/java/jni/androidnetworkmonitor_jni.h',
-            'app/webrtc/java/jni/androidvideocapturer_jni.cc',
-            'app/webrtc/java/jni/androidvideocapturer_jni.h',
-            'app/webrtc/java/jni/classreferenceholder.cc',
-            'app/webrtc/java/jni/classreferenceholder.h',
-            'app/webrtc/java/jni/eglbase_jni.cc',
-            'app/webrtc/java/jni/eglbase_jni.h',
-            'app/webrtc/java/jni/jni_helpers.cc',
-            'app/webrtc/java/jni/jni_helpers.h',
-            'app/webrtc/java/jni/native_handle_impl.cc',
-            'app/webrtc/java/jni/native_handle_impl.h',
-            'app/webrtc/java/jni/peerconnection_jni.cc',
-            'app/webrtc/java/jni/surfacetexturehelper_jni.cc',
-            'app/webrtc/java/jni/surfacetexturehelper_jni.h',
-          ],
-          'include_dirs': [
-            '<(libyuv_dir)/include',
-          ],
-          'conditions': [
-           ['build_json==1', {
-              'dependencies': [
-                '<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
-              ],
-              'export_dependent_settings': [
-                '<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
-              ],
-            }],
-          ],
-        },
-        {
-          'target_name': 'libjingle_peerconnection_so',
-          'type': 'shared_library',
-          'dependencies': [
-            'libjingle_peerconnection',
-            'libjingle_peerconnection_jni',
-          ],
-          'sources': [
-           'app/webrtc/java/jni/jni_onload.cc',
-          ],
-          'variables': {
-            # This library uses native JNI exports; tell GYP so that the
-            # required symbols will be kept.
-            'use_native_jni_exports': 1,
-          },
-        },
-        {
-          # |libjingle_peerconnection_java| builds a jar file with name
-          # libjingle_peerconnection_java.jar using Chromes build system.
-          # It includes all Java files needed to setup a PeeerConnection call
-          # from Android.
-          'target_name': 'libjingle_peerconnection_java',
-          'type': 'none',
-          'dependencies': [
-            'libjingle_peerconnection_so',
-          ],
-          'variables': {
-            # Designate as Chromium code and point to our lint settings to
-            # enable linting of the WebRTC code (this is the only way to make
-            # lint_action invoke the Android linter).
-            'android_manifest_path': '<(webrtc_root)/build/android/AndroidManifest.xml',
-            'suppressions_file': '<(webrtc_root)/build/android/suppressions.xml',
-            'chromium_code': 1,
-            'java_in_dir': 'app/webrtc/java',
-            'webrtc_base_dir': '<(webrtc_root)/base',
-            'webrtc_modules_dir': '<(webrtc_root)/modules',
-            'additional_src_dirs' : [
-              'app/webrtc/java/android',
-              '<(webrtc_base_dir)/java/src',
-              '<(webrtc_modules_dir)/audio_device/android/java/src',
-              '<(webrtc_modules_dir)/video_render/android/java/src',
-            ],
-          },
-          'includes': ['../build/java.gypi'],
-        }, # libjingle_peerconnection_java
-      ]
-    }],
     ['OS=="ios" or (OS=="mac" and target_arch!="ia32")', {
       # The >= 10.7 above is required for ARC.
       'targets': [
@@ -141,7 +34,7 @@
           'target_name': 'libjingle_peerconnection_objc',
           'type': 'static_library',
           'dependencies': [
-            'libjingle_peerconnection',
+            '<(webrtc_root)/api/api.gyp:libjingle_peerconnection',
           ],
           'sources': [
             'app/webrtc/objc/RTCAudioTrack+Internal.h',
@@ -223,7 +116,7 @@
             ],
           },
           'include_dirs': [
-            '<(DEPTH)/talk/app/webrtc',
+            '<(webrtc_root)/webrtc/api',
             '<(DEPTH)/talk/app/webrtc/objc',
             '<(DEPTH)/talk/app/webrtc/objc/public',
           ],
@@ -295,7 +188,6 @@
       ],
     }],
   ],
-
   'targets': [
     {
       'target_name': 'libjingle_p2p',
@@ -348,86 +240,5 @@
         'session/media/voicechannel.h',
       ],
     },  # target libjingle_p2p
-    {
-      'target_name': 'libjingle_peerconnection',
-      'type': 'static_library',
-      'dependencies': [
-        '<(webrtc_root)/base/base.gyp:rtc_base',
-        '<(webrtc_root)/media/media.gyp:rtc_media',
-        'libjingle_p2p',
-      ],
-      'sources': [
-        'app/webrtc/audiotrack.cc',
-        'app/webrtc/audiotrack.h',
-        'app/webrtc/datachannel.cc',
-        'app/webrtc/datachannel.h',
-        'app/webrtc/datachannelinterface.h',
-        'app/webrtc/dtlsidentitystore.cc',
-        'app/webrtc/dtlsidentitystore.h',
-        'app/webrtc/dtmfsender.cc',
-        'app/webrtc/dtmfsender.h',
-        'app/webrtc/dtmfsenderinterface.h',
-        'app/webrtc/jsep.h',
-        'app/webrtc/jsepicecandidate.cc',
-        'app/webrtc/jsepicecandidate.h',
-        'app/webrtc/jsepsessiondescription.cc',
-        'app/webrtc/jsepsessiondescription.h',
-        'app/webrtc/localaudiosource.cc',
-        'app/webrtc/localaudiosource.h',
-        'app/webrtc/mediaconstraintsinterface.cc',
-        'app/webrtc/mediaconstraintsinterface.h',
-        'app/webrtc/mediacontroller.cc',
-        'app/webrtc/mediacontroller.h',
-        'app/webrtc/mediastream.cc',
-        'app/webrtc/mediastream.h',
-        'app/webrtc/mediastreaminterface.h',
-        'app/webrtc/mediastreamobserver.cc',
-        'app/webrtc/mediastreamobserver.h',
-        'app/webrtc/mediastreamprovider.h',
-        'app/webrtc/mediastreamproxy.h',
-        'app/webrtc/mediastreamtrack.h',
-        'app/webrtc/mediastreamtrackproxy.h',
-        'app/webrtc/notifier.h',
-        'app/webrtc/peerconnection.cc',
-        'app/webrtc/peerconnection.h',
-        'app/webrtc/peerconnectionfactory.cc',
-        'app/webrtc/peerconnectionfactory.h',
-        'app/webrtc/peerconnectionfactoryproxy.h',
-        'app/webrtc/peerconnectioninterface.h',
-        'app/webrtc/peerconnectionproxy.h',
-        'app/webrtc/proxy.h',
-        'app/webrtc/remoteaudiosource.cc',
-        'app/webrtc/remoteaudiosource.h',
-        'app/webrtc/remotevideocapturer.cc',
-        'app/webrtc/remotevideocapturer.h',
-        'app/webrtc/rtpreceiver.cc',
-        'app/webrtc/rtpreceiver.h',
-        'app/webrtc/rtpreceiverinterface.h',
-        'app/webrtc/rtpsender.cc',
-        'app/webrtc/rtpsender.h',
-        'app/webrtc/rtpsenderinterface.h',
-        'app/webrtc/sctputils.cc',
-        'app/webrtc/sctputils.h',
-        'app/webrtc/statscollector.cc',
-        'app/webrtc/statscollector.h',
-        'app/webrtc/statstypes.cc',
-        'app/webrtc/statstypes.h',
-        'app/webrtc/streamcollection.h',
-        'app/webrtc/videosource.cc',
-        'app/webrtc/videosource.h',
-        'app/webrtc/videosourceinterface.h',
-        'app/webrtc/videosourceproxy.h',
-        'app/webrtc/videotrack.cc',
-        'app/webrtc/videotrack.h',
-        'app/webrtc/videotrackrenderers.cc',
-        'app/webrtc/videotrackrenderers.h',
-        'app/webrtc/webrtcsdp.cc',
-        'app/webrtc/webrtcsdp.h',
-        'app/webrtc/webrtcsession.cc',
-        'app/webrtc/webrtcsession.h',
-        'app/webrtc/webrtcsessiondescriptionfactory.cc',
-        'app/webrtc/webrtcsessiondescriptionfactory.h',
-      ],
-    },  # target libjingle_peerconnection
   ],
 }
diff --git a/talk/libjingle_tests.gyp b/talk/libjingle_tests.gyp
index 96ca4dc..f45a99c 100755
--- a/talk/libjingle_tests.gyp
+++ b/talk/libjingle_tests.gyp
@@ -31,9 +31,9 @@
       'target_name': 'libjingle_p2p_unittest',
       'type': 'executable',
       'dependencies': [
+        '<(webrtc_root)/api/api.gyp:libjingle_peerconnection',
         '<(webrtc_root)/base/base_tests.gyp:rtc_base_tests_utils',
         '<(webrtc_root)/webrtc.gyp:rtc_unittest_main',
-        'libjingle.gyp:libjingle_peerconnection',
         'libjingle.gyp:libjingle_p2p',
       ],
       'include_dirs': [
@@ -65,101 +65,8 @@
         }],
       ],
     },  # target libjingle_p2p_unittest
-    {
-      'target_name': 'peerconnection_unittests',
-      'type': '<(gtest_target_type)',
-      'dependencies': [
-        '<(DEPTH)/testing/gmock.gyp:gmock',
-        '<(webrtc_root)/base/base_tests.gyp:rtc_base_tests_utils',
-        '<(webrtc_root)/common.gyp:webrtc_common',
-        '<(webrtc_root)/webrtc.gyp:rtc_unittest_main',
-        'libjingle.gyp:libjingle_p2p',
-        'libjingle.gyp:libjingle_peerconnection',
-      ],
-      'direct_dependent_settings': {
-        'include_dirs': [
-          '<(DEPTH)/testing/gmock/include',
-        ],
-      },
-      'sources': [
-        'app/webrtc/datachannel_unittest.cc',
-        'app/webrtc/dtlsidentitystore_unittest.cc',
-        'app/webrtc/dtmfsender_unittest.cc',
-        'app/webrtc/fakemetricsobserver.cc',
-        'app/webrtc/fakemetricsobserver.h',
-        'app/webrtc/jsepsessiondescription_unittest.cc',
-        'app/webrtc/localaudiosource_unittest.cc',
-        'app/webrtc/mediastream_unittest.cc',
-        'app/webrtc/peerconnection_unittest.cc',
-        'app/webrtc/peerconnectionendtoend_unittest.cc',
-        'app/webrtc/peerconnectionfactory_unittest.cc',
-        'app/webrtc/peerconnectioninterface_unittest.cc',
-        # 'app/webrtc/peerconnectionproxy_unittest.cc',
-        'app/webrtc/remotevideocapturer_unittest.cc',
-        'app/webrtc/rtpsenderreceiver_unittest.cc',
-        'app/webrtc/statscollector_unittest.cc',
-        'app/webrtc/test/fakeaudiocapturemodule.cc',
-        'app/webrtc/test/fakeaudiocapturemodule.h',
-        'app/webrtc/test/fakeaudiocapturemodule_unittest.cc',
-        'app/webrtc/test/fakeconstraints.h',
-        'app/webrtc/test/fakedatachannelprovider.h',
-        'app/webrtc/test/fakedtlsidentitystore.h',
-        'app/webrtc/test/fakeperiodicvideocapturer.h',
-        'app/webrtc/test/fakevideotrackrenderer.h',
-        'app/webrtc/test/mockpeerconnectionobservers.h',
-        'app/webrtc/test/peerconnectiontestwrapper.h',
-        'app/webrtc/test/peerconnectiontestwrapper.cc',
-        'app/webrtc/test/testsdpstrings.h',
-        'app/webrtc/videosource_unittest.cc',
-        'app/webrtc/videotrack_unittest.cc',
-        'app/webrtc/webrtcsdp_unittest.cc',
-        'app/webrtc/webrtcsession_unittest.cc',
-      ],
-      'conditions': [
-        ['OS=="android"', {
-          'sources': [
-            'app/webrtc/test/androidtestinitializer.cc',
-            'app/webrtc/test/androidtestinitializer.h',
-          ],
-          'dependencies': [
-            '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
-            'libjingle.gyp:libjingle_peerconnection_jni',
-          ],
-        }],
-        ['OS=="win" and clang==1', {
-          'msvs_settings': {
-            'VCCLCompilerTool': {
-              'AdditionalOptions': [
-                # Disable warnings failing when compiling with Clang on Windows.
-                # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
-                '-Wno-unused-function',
-              ],
-            },
-          },
-        }],
-      ],
-    },  # target peerconnection_unittests
   ],
   'conditions': [
-    ['OS=="android"', {
-      'targets': [
-        {
-          'target_name': 'libjingle_peerconnection_android_unittest',
-          'type': 'none',
-          'dependencies': [
-            'libjingle.gyp:libjingle_peerconnection_java',
-          ],
-          'variables': {
-            'apk_name': 'libjingle_peerconnection_android_unittest',
-            'java_in_dir': 'app/webrtc/androidtests',
-            'resource_dir': 'app/webrtc/androidtests/res',
-            'native_lib_target': 'libjingle_peerconnection_so',
-            'is_test_apk': 1,
-          },
-          'includes': [ '../build/java_apk.gypi' ],
-        },
-      ],  # targets
-    }],  # OS=="android"
     ['OS=="ios" or (OS=="mac" and target_arch!="ia32")', {
       # The >=10.7 above is required to make ARC link cleanly (e.g. as
       # opposed to _compile_ cleanly, which the library under test
@@ -204,8 +111,8 @@
           'dependencies': [
             '<(webrtc_root)/base/base_tests.gyp:rtc_base_tests_utils',
             '<(webrtc_root)/system_wrappers/system_wrappers.gyp:field_trial_default',
-            '<(DEPTH)/third_party/ocmock/ocmock.gyp:ocmock',
             '<(webrtc_root)/webrtc_examples.gyp:apprtc_signaling',
+            '<(DEPTH)/third_party/ocmock/ocmock.gyp:ocmock',
           ],
           'sources': [
             'app/webrtc/objctests/mac/main.mm',
@@ -221,17 +128,6 @@
         },  # target apprtc_signaling_gunit_test
       ],
     }],
-    ['OS=="android"', {
-      'targets': [
-        {
-          'target_name': 'peerconnection_unittests_apk_target',
-          'type': 'none',
-          'dependencies': [
-            '<(DEPTH)/webrtc/build/apk_tests.gyp:peerconnection_unittests_apk',
-          ],
-        },
-      ],
-    }],
     ['test_isolation_mode != "noop"', {
       'targets': [
         {
@@ -247,19 +143,6 @@
             'libjingle_p2p_unittest.isolate',
           ],
         },
-        {
-          'target_name': 'peerconnection_unittests_run',
-          'type': 'none',
-          'dependencies': [
-            'peerconnection_unittests',
-          ],
-          'includes': [
-            'build/isolate.gypi',
-          ],
-          'sources': [
-            'peerconnection_unittests.isolate',
-          ],
-        },
       ],
     }],
   ],
diff --git a/talk/session/media/channelmanager.cc b/talk/session/media/channelmanager.cc
index bfecb58..8124f28 100644
--- a/talk/session/media/channelmanager.cc
+++ b/talk/session/media/channelmanager.cc
@@ -33,7 +33,15 @@
 
 #include <algorithm>
 
-#include "talk/app/webrtc/mediacontroller.h"
+#include "talk/session/media/srtpfilter.h"
+#include "webrtc/api/mediacontroller.h"
+#include "webrtc/base/bind.h"
+#include "webrtc/base/common.h"
+#include "webrtc/base/logging.h"
+#include "webrtc/base/sigslotrepeater.h"
+#include "webrtc/base/stringencode.h"
+#include "webrtc/base/stringutils.h"
+#include "webrtc/base/trace_event.h"
 #include "webrtc/media/base/capturemanager.h"
 #include "webrtc/media/base/device.h"
 #include "webrtc/media/base/hybriddataengine.h"
@@ -42,14 +50,6 @@
 #ifdef HAVE_SCTP
 #include "webrtc/media/sctp/sctpdataengine.h"
 #endif
-#include "talk/session/media/srtpfilter.h"
-#include "webrtc/base/bind.h"
-#include "webrtc/base/common.h"
-#include "webrtc/base/logging.h"
-#include "webrtc/base/sigslotrepeater.h"
-#include "webrtc/base/stringencode.h"
-#include "webrtc/base/stringutils.h"
-#include "webrtc/base/trace_event.h"
 
 namespace cricket {
 
diff --git a/talk/session/media/channelmanager_unittest.cc b/talk/session/media/channelmanager_unittest.cc
index 81faad4..98497a3 100644
--- a/talk/session/media/channelmanager_unittest.cc
+++ b/talk/session/media/channelmanager_unittest.cc
@@ -25,8 +25,8 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/fakemediacontroller.h"
 #include "talk/session/media/channelmanager.h"
+#include "webrtc/api/fakemediacontroller.h"
 #include "webrtc/base/gunit.h"
 #include "webrtc/base/logging.h"
 #include "webrtc/base/thread.h"
diff --git a/webrtc/api/OWNERS b/webrtc/api/OWNERS
index cd06158..2a0a6ae 100644
--- a/webrtc/api/OWNERS
+++ b/webrtc/api/OWNERS
@@ -1 +1,6 @@
+pthatcher@webrtc.org
+glaznev@webrtc.org
+juberti@webrtc.org
+perkj@webrtc.org
 tkchin@webrtc.org
+tommi@webrtc.org
diff --git a/talk/app/webrtc/androidtests/AndroidManifest.xml b/webrtc/api/androidtests/AndroidManifest.xml
similarity index 100%
rename from talk/app/webrtc/androidtests/AndroidManifest.xml
rename to webrtc/api/androidtests/AndroidManifest.xml
diff --git a/talk/app/webrtc/androidtests/OWNERS b/webrtc/api/androidtests/OWNERS
similarity index 100%
rename from talk/app/webrtc/androidtests/OWNERS
rename to webrtc/api/androidtests/OWNERS
diff --git a/talk/app/webrtc/androidtests/ant.properties b/webrtc/api/androidtests/ant.properties
similarity index 100%
rename from talk/app/webrtc/androidtests/ant.properties
rename to webrtc/api/androidtests/ant.properties
diff --git a/talk/app/webrtc/androidtests/build.xml b/webrtc/api/androidtests/build.xml
similarity index 100%
rename from talk/app/webrtc/androidtests/build.xml
rename to webrtc/api/androidtests/build.xml
diff --git a/talk/app/webrtc/androidtests/project.properties b/webrtc/api/androidtests/project.properties
similarity index 100%
rename from talk/app/webrtc/androidtests/project.properties
rename to webrtc/api/androidtests/project.properties
diff --git a/talk/app/webrtc/androidtests/res/drawable-hdpi/ic_launcher.png b/webrtc/api/androidtests/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from talk/app/webrtc/androidtests/res/drawable-hdpi/ic_launcher.png
rename to webrtc/api/androidtests/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/talk/app/webrtc/androidtests/res/drawable-ldpi/ic_launcher.png b/webrtc/api/androidtests/res/drawable-ldpi/ic_launcher.png
similarity index 100%
rename from talk/app/webrtc/androidtests/res/drawable-ldpi/ic_launcher.png
rename to webrtc/api/androidtests/res/drawable-ldpi/ic_launcher.png
Binary files differ
diff --git a/talk/app/webrtc/androidtests/res/drawable-mdpi/ic_launcher.png b/webrtc/api/androidtests/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from talk/app/webrtc/androidtests/res/drawable-mdpi/ic_launcher.png
rename to webrtc/api/androidtests/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/talk/app/webrtc/androidtests/res/drawable-xhdpi/ic_launcher.png b/webrtc/api/androidtests/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from talk/app/webrtc/androidtests/res/drawable-xhdpi/ic_launcher.png
rename to webrtc/api/androidtests/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/talk/app/webrtc/androidtests/res/values/strings.xml b/webrtc/api/androidtests/res/values/strings.xml
similarity index 100%
rename from talk/app/webrtc/androidtests/res/values/strings.xml
rename to webrtc/api/androidtests/res/values/strings.xml
diff --git a/talk/app/webrtc/androidtests/src/org/webrtc/GlRectDrawerTest.java b/webrtc/api/androidtests/src/org/webrtc/GlRectDrawerTest.java
similarity index 100%
rename from talk/app/webrtc/androidtests/src/org/webrtc/GlRectDrawerTest.java
rename to webrtc/api/androidtests/src/org/webrtc/GlRectDrawerTest.java
diff --git a/talk/app/webrtc/androidtests/src/org/webrtc/MediaCodecVideoEncoderTest.java b/webrtc/api/androidtests/src/org/webrtc/MediaCodecVideoEncoderTest.java
similarity index 100%
rename from talk/app/webrtc/androidtests/src/org/webrtc/MediaCodecVideoEncoderTest.java
rename to webrtc/api/androidtests/src/org/webrtc/MediaCodecVideoEncoderTest.java
diff --git a/talk/app/webrtc/androidtests/src/org/webrtc/NetworkMonitorTest.java b/webrtc/api/androidtests/src/org/webrtc/NetworkMonitorTest.java
similarity index 100%
rename from talk/app/webrtc/androidtests/src/org/webrtc/NetworkMonitorTest.java
rename to webrtc/api/androidtests/src/org/webrtc/NetworkMonitorTest.java
diff --git a/talk/app/webrtc/androidtests/src/org/webrtc/PeerConnectionTest.java b/webrtc/api/androidtests/src/org/webrtc/PeerConnectionTest.java
similarity index 100%
rename from talk/app/webrtc/androidtests/src/org/webrtc/PeerConnectionTest.java
rename to webrtc/api/androidtests/src/org/webrtc/PeerConnectionTest.java
diff --git a/talk/app/webrtc/androidtests/src/org/webrtc/RendererCommonTest.java b/webrtc/api/androidtests/src/org/webrtc/RendererCommonTest.java
similarity index 100%
rename from talk/app/webrtc/androidtests/src/org/webrtc/RendererCommonTest.java
rename to webrtc/api/androidtests/src/org/webrtc/RendererCommonTest.java
diff --git a/talk/app/webrtc/androidtests/src/org/webrtc/SurfaceTextureHelperTest.java b/webrtc/api/androidtests/src/org/webrtc/SurfaceTextureHelperTest.java
similarity index 100%
rename from talk/app/webrtc/androidtests/src/org/webrtc/SurfaceTextureHelperTest.java
rename to webrtc/api/androidtests/src/org/webrtc/SurfaceTextureHelperTest.java
diff --git a/talk/app/webrtc/androidtests/src/org/webrtc/SurfaceViewRendererOnMeasureTest.java b/webrtc/api/androidtests/src/org/webrtc/SurfaceViewRendererOnMeasureTest.java
similarity index 100%
rename from talk/app/webrtc/androidtests/src/org/webrtc/SurfaceViewRendererOnMeasureTest.java
rename to webrtc/api/androidtests/src/org/webrtc/SurfaceViewRendererOnMeasureTest.java
diff --git a/talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java b/webrtc/api/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java
similarity index 100%
rename from talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java
rename to webrtc/api/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java
diff --git a/talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTestFixtures.java b/webrtc/api/androidtests/src/org/webrtc/VideoCapturerAndroidTestFixtures.java
similarity index 100%
rename from talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTestFixtures.java
rename to webrtc/api/androidtests/src/org/webrtc/VideoCapturerAndroidTestFixtures.java
diff --git a/talk/app/webrtc/androidvideocapturer.cc b/webrtc/api/androidvideocapturer.cc
similarity index 98%
rename from talk/app/webrtc/androidvideocapturer.cc
rename to webrtc/api/androidvideocapturer.cc
index 6b0d51c..276067a 100644
--- a/talk/app/webrtc/androidvideocapturer.cc
+++ b/webrtc/api/androidvideocapturer.cc
@@ -24,9 +24,10 @@
  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-#include "talk/app/webrtc/androidvideocapturer.h"
 
-#include "talk/app/webrtc/java/jni/native_handle_impl.h"
+#include "webrtc/api/androidvideocapturer.h"
+
+#include "webrtc/api/java/jni/native_handle_impl.h"
 #include "webrtc/base/common.h"
 #include "webrtc/base/json.h"
 #include "webrtc/base/timeutils.h"
diff --git a/talk/app/webrtc/androidvideocapturer.h b/webrtc/api/androidvideocapturer.h
similarity index 96%
rename from talk/app/webrtc/androidvideocapturer.h
rename to webrtc/api/androidvideocapturer.h
index c6022f7..cba5224 100644
--- a/talk/app/webrtc/androidvideocapturer.h
+++ b/webrtc/api/androidvideocapturer.h
@@ -24,8 +24,9 @@
  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-#ifndef TALK_APP_WEBRTC_ANDROIDVIDEOCAPTURER_H_
-#define TALK_APP_WEBRTC_ANDROIDVIDEOCAPTURER_H_
+
+#ifndef WEBRTC_API_ANDROIDVIDEOCAPTURER_H_
+#define WEBRTC_API_ANDROIDVIDEOCAPTURER_H_
 
 #include <string>
 #include <vector>
@@ -105,4 +106,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_ANDROIDVIDEOCAPTURER_H_
+#endif  // WEBRTC_API_ANDROIDVIDEOCAPTURER_H_
diff --git a/webrtc/api/api.gyp b/webrtc/api/api.gyp
index ac4ea84..fe7cd0e 100644
--- a/webrtc/api/api.gyp
+++ b/webrtc/api/api.gyp
@@ -9,6 +9,131 @@
 {
   'includes': [ '../build/common.gypi', ],
   'conditions': [
+    ['os_posix == 1 and OS != "mac" and OS != "ios"', {
+      'conditions': [
+        ['sysroot!=""', {
+          'variables': {
+            'pkg-config': '../../../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
+          },
+        }, {
+          'variables': {
+            'pkg-config': 'pkg-config'
+          },
+        }],
+      ],
+    }],
+    ['OS=="android"', {
+      'targets': [
+        {
+          'target_name': 'libjingle_peerconnection_jni',
+          'type': 'static_library',
+          'dependencies': [
+            '<(webrtc_root)/system_wrappers/system_wrappers.gyp:field_trial_default',
+            'libjingle_peerconnection',
+          ],
+          'sources': [
+            'androidvideocapturer.cc',
+            'androidvideocapturer.h',
+            'java/jni/androidmediacodeccommon.h',
+            'java/jni/androidmediadecoder_jni.cc',
+            'java/jni/androidmediadecoder_jni.h',
+            'java/jni/androidmediaencoder_jni.cc',
+            'java/jni/androidmediaencoder_jni.h',
+            'java/jni/androidnetworkmonitor_jni.cc',
+            'java/jni/androidnetworkmonitor_jni.h',
+            'java/jni/androidvideocapturer_jni.cc',
+            'java/jni/androidvideocapturer_jni.h',
+            'java/jni/eglbase_jni.cc',
+            'java/jni/eglbase_jni.h',
+            'java/jni/surfacetexturehelper_jni.cc',
+            'java/jni/surfacetexturehelper_jni.h',
+            'java/jni/classreferenceholder.cc',
+            'java/jni/classreferenceholder.h',
+            'java/jni/jni_helpers.cc',
+            'java/jni/jni_helpers.h',
+            'java/jni/native_handle_impl.cc',
+            'java/jni/native_handle_impl.h',
+            'java/jni/peerconnection_jni.cc',
+          ],
+          'include_dirs': [
+            '<(libyuv_dir)/include',
+          ],
+          # TODO(kjellander): Make the code compile without disabling these flags.
+          # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307
+          'cflags': [
+            '-Wno-sign-compare',
+            '-Wno-unused-variable',
+          ],
+          'cflags!': [
+            '-Wextra',
+          ],
+          'cflags_cc!': [
+            '-Wnon-virtual-dtor',
+            '-Woverloaded-virtual',
+          ],
+          'msvs_disabled_warnings': [
+            4245,  # conversion from 'int' to 'size_t', signed/unsigned mismatch.
+            4267,  # conversion from 'size_t' to 'int', possible loss of data.
+            4389,  # signed/unsigned mismatch.
+          ],
+          'conditions': [
+            ['build_json==1', {
+              'dependencies': [
+                '<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
+              ],
+              'export_dependent_settings': [
+                '<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
+              ],
+            }],
+          ],
+        },
+        {
+          'target_name': 'libjingle_peerconnection_so',
+          'type': 'shared_library',
+          'dependencies': [
+            'libjingle_peerconnection',
+            'libjingle_peerconnection_jni',
+          ],
+          'sources': [
+           'java/jni/jni_onload.cc',
+          ],
+          'variables': {
+            # This library uses native JNI exports; tell GYP so that the
+            # required symbols will be kept.
+            'use_native_jni_exports': 1,
+          },
+        },
+        {
+          # |libjingle_peerconnection_java| builds a jar file with name
+          # libjingle_peerconnection_java.jar using Chrome's build system.
+          # It includes all Java files needed to setup a PeeerConnection call
+          # from Android.
+          'target_name': 'libjingle_peerconnection_java',
+          'type': 'none',
+          'dependencies': [
+            'libjingle_peerconnection_so',
+          ],
+          'variables': {
+            # Designate as Chromium code and point to our lint settings to
+            # enable linting of the WebRTC code (this is the only way to make
+            # lint_action invoke the Android linter).
+            'android_manifest_path': '<(webrtc_root)/build/android/AndroidManifest.xml',
+            'suppressions_file': '<(webrtc_root)/build/android/suppressions.xml',
+            'chromium_code': 1,
+            'java_in_dir': 'java',
+            'webrtc_base_dir': '<(webrtc_root)/base',
+            'webrtc_modules_dir': '<(webrtc_root)/modules',
+            'additional_src_dirs' : [
+              'java/android',
+              '<(webrtc_base_dir)/java/src',
+              '<(webrtc_modules_dir)/audio_device/android/java/src',
+              '<(webrtc_modules_dir)/video_render/android/java/src',
+            ],
+          },
+          'includes': ['../../build/java.gypi'],
+        }, # libjingle_peerconnection_java
+      ]
+    }],
     ['OS=="ios"', {
       'targets': [
         {
@@ -16,7 +141,7 @@
           'type': 'static_library',
           'dependencies': [
             '<(webrtc_root)/base/base.gyp:rtc_base_objc',
-            '../../talk/libjingle.gyp:libjingle_peerconnection',
+            'libjingle_peerconnection',
           ],
           'sources': [
             'objc/RTCAVFoundationVideoSource+Private.h',
@@ -117,6 +242,128 @@
           },
         }
       ],
-    }], # OS=="ios"
-  ],
+    }],  # OS=="ios"
+  ],  # conditions
+  'targets': [
+    {
+      'target_name': 'libjingle_peerconnection',
+      'type': 'static_library',
+      'dependencies': [
+        '<(webrtc_root)/media/media.gyp:rtc_media',
+        '../../talk/libjingle.gyp:libjingle_p2p',
+      ],
+      'sources': [
+        'audiotrack.cc',
+        'audiotrack.h',
+        'datachannel.cc',
+        'datachannel.h',
+        'datachannelinterface.h',
+        'dtlsidentitystore.cc',
+        'dtlsidentitystore.h',
+        'dtmfsender.cc',
+        'dtmfsender.h',
+        'dtmfsenderinterface.h',
+        'jsep.h',
+        'jsepicecandidate.cc',
+        'jsepicecandidate.h',
+        'jsepsessiondescription.cc',
+        'jsepsessiondescription.h',
+        'localaudiosource.cc',
+        'localaudiosource.h',
+        'mediaconstraintsinterface.cc',
+        'mediaconstraintsinterface.h',
+        'mediacontroller.cc',
+        'mediacontroller.h',
+        'mediastream.cc',
+        'mediastream.h',
+        'mediastreaminterface.h',
+        'mediastreamobserver.cc',
+        'mediastreamobserver.h',
+        'mediastreamprovider.h',
+        'mediastreamproxy.h',
+        'mediastreamtrack.h',
+        'mediastreamtrackproxy.h',
+        'notifier.h',
+        'peerconnection.cc',
+        'peerconnection.h',
+        'peerconnectionfactory.cc',
+        'peerconnectionfactory.h',
+        'peerconnectionfactoryproxy.h',
+        'peerconnectioninterface.h',
+        'peerconnectionproxy.h',
+        'proxy.h',
+        'remoteaudiosource.cc',
+        'remoteaudiosource.h',
+        'remotevideocapturer.cc',
+        'remotevideocapturer.h',
+        'rtpreceiver.cc',
+        'rtpreceiver.h',
+        'rtpreceiverinterface.h',
+        'rtpsender.cc',
+        'rtpsender.h',
+        'rtpsenderinterface.h',
+        'sctputils.cc',
+        'sctputils.h',
+        'statscollector.cc',
+        'statscollector.h',
+        'statstypes.cc',
+        'statstypes.h',
+        'streamcollection.h',
+        'videosource.cc',
+        'videosource.h',
+        'videosourceinterface.h',
+        'videosourceproxy.h',
+        'videotrack.cc',
+        'videotrack.h',
+        'videotrackrenderers.cc',
+        'videotrackrenderers.h',
+        'webrtcsdp.cc',
+        'webrtcsdp.h',
+        'webrtcsession.cc',
+        'webrtcsession.h',
+        'webrtcsessiondescriptionfactory.cc',
+        'webrtcsessiondescriptionfactory.h',
+      ],
+      # TODO(kjellander): Make the code compile without disabling these flags.
+      # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307
+      'cflags': [
+        '-Wno-sign-compare',
+      ],
+      'cflags_cc!': [
+        '-Wnon-virtual-dtor',
+        '-Woverloaded-virtual',
+      ],
+      'conditions': [
+        ['clang==1', {
+          'cflags!': [
+            '-Wextra',
+          ],
+          'xcode_settings': {
+            'WARNING_CFLAGS!': ['-Wextra'],
+          },
+        }, {
+          'cflags': [
+            '-Wno-maybe-uninitialized',  # Only exists for GCC.
+          ],
+        }],
+        ['OS=="win"', {
+          # Disable warning for signed/unsigned mismatch.
+          'msvs_settings': {
+            'VCCLCompilerTool': {
+              'AdditionalOptions!': ['/we4389'],
+            },
+          },
+        }],
+        ['OS=="win" and clang==1', {
+          'msvs_settings': {
+            'VCCLCompilerTool': {
+              'AdditionalOptions': [
+                '-Wno-sign-compare',
+              ],
+            },
+          },
+        }],
+      ],
+    },  # target libjingle_peerconnection
+  ],  # targets
 }
diff --git a/webrtc/api/api_tests.gyp b/webrtc/api/api_tests.gyp
index cdb23fb..31bc699 100644
--- a/webrtc/api/api_tests.gyp
+++ b/webrtc/api/api_tests.gyp
@@ -8,7 +8,135 @@
 
 {
   'includes': [ '../build/common.gypi', ],
+  'targets': [
+    {
+      'target_name': 'peerconnection_unittests',
+      'type': '<(gtest_target_type)',
+      'dependencies': [
+        '<(DEPTH)/testing/gmock.gyp:gmock',
+        '<(webrtc_root)/api/api.gyp:libjingle_peerconnection',
+        '<(webrtc_root)/base/base_tests.gyp:rtc_base_tests_utils',
+        '<(webrtc_root)/common.gyp:webrtc_common',
+        '<(webrtc_root)/webrtc.gyp:rtc_unittest_main',
+        '../../talk/libjingle.gyp:libjingle_p2p',
+      ],
+      'direct_dependent_settings': {
+        'include_dirs': [
+          '<(DEPTH)/testing/gmock/include',
+        ],
+      },
+      'defines': [
+        # Feature selection.
+        'HAVE_SCTP',
+      ],
+      'sources': [
+        'datachannel_unittest.cc',
+        'dtlsidentitystore_unittest.cc',
+        'dtmfsender_unittest.cc',
+        'fakemetricsobserver.cc',
+        'fakemetricsobserver.h',
+        'jsepsessiondescription_unittest.cc',
+        'localaudiosource_unittest.cc',
+        'mediastream_unittest.cc',
+        'peerconnection_unittest.cc',
+        'peerconnectionendtoend_unittest.cc',
+        'peerconnectionfactory_unittest.cc',
+        'peerconnectioninterface_unittest.cc',
+        # 'peerconnectionproxy_unittest.cc',
+        'remotevideocapturer_unittest.cc',
+        'rtpsenderreceiver_unittest.cc',
+        'statscollector_unittest.cc',
+        'test/fakeaudiocapturemodule.cc',
+        'test/fakeaudiocapturemodule.h',
+        'test/fakeaudiocapturemodule_unittest.cc',
+        'test/fakeconstraints.h',
+        'test/fakedatachannelprovider.h',
+        'test/fakedtlsidentitystore.h',
+        'test/fakeperiodicvideocapturer.h',
+        'test/fakevideotrackrenderer.h',
+        'test/mockpeerconnectionobservers.h',
+        'test/peerconnectiontestwrapper.h',
+        'test/peerconnectiontestwrapper.cc',
+        'test/testsdpstrings.h',
+        'videosource_unittest.cc',
+        'videotrack_unittest.cc',
+        'webrtcsdp_unittest.cc',
+        'webrtcsession_unittest.cc',
+      ],
+      # TODO(kjellander): Make the code compile without disabling these flags.
+      # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307
+      'cflags': [
+        '-Wno-sign-compare',
+      ],
+      'cflags!': [
+        '-Wextra',
+      ],
+      'cflags_cc!': [
+        '-Wnon-virtual-dtor',
+        '-Woverloaded-virtual',
+      ],
+      'msvs_disabled_warnings': [
+        4245,  # conversion from 'int' to 'size_t', signed/unsigned mismatch.
+        4267,  # conversion from 'size_t' to 'int', possible loss of data.
+        4389,  # signed/unsigned mismatch.
+      ],
+      'conditions': [
+        ['clang==1', {
+          # TODO(kjellander): Make the code compile without disabling these flags.
+          # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307
+          'cflags!': [
+            '-Wextra',
+          ],
+          'xcode_settings': {
+            'WARNING_CFLAGS!': ['-Wextra'],
+          },
+        }],
+        ['OS=="android"', {
+          'sources': [
+            'test/androidtestinitializer.cc',
+            'test/androidtestinitializer.h',
+          ],
+          'dependencies': [
+            '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
+            '<(webrtc_root)/api/api.gyp:libjingle_peerconnection_jni',
+          ],
+        }],
+        ['OS=="win" and clang==1', {
+          'msvs_settings': {
+            'VCCLCompilerTool': {
+              'AdditionalOptions': [
+                # Disable warnings failing when compiling with Clang on Windows.
+                # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
+                '-Wno-sign-compare',
+                '-Wno-unused-function',
+              ],
+            },
+          },
+        }],
+      ],  # conditions
+    },  # target peerconnection_unittests
+  ],  # targets
   'conditions': [
+    ['OS=="android"', {
+      'targets': [
+        {
+          'target_name': 'libjingle_peerconnection_android_unittest',
+          'type': 'none',
+          'dependencies': [
+            '<(webrtc_root)/api/api.gyp:libjingle_peerconnection_java',
+          ],
+          'variables': {
+            'apk_name': 'libjingle_peerconnection_android_unittest',
+            'java_in_dir': 'androidtests',
+            'resource_dir': 'androidtests/res',
+            'native_lib_target': 'libjingle_peerconnection_so',
+            'is_test_apk': 1,
+            'never_lint': 1,
+          },
+          'includes': [ '../../build/java_apk.gypi' ],
+        },
+      ],  # targets
+    }],  # OS=="android"
     ['OS=="ios"', {
       'targets': [
         {
@@ -35,8 +163,36 @@
             # https://developer.apple.com/library/mac/qa/qa1490/_index.html
             'OTHER_LDFLAGS': ['-ObjC'],
           },
-        }
+        },
       ],
-    }], # OS=="ios"
-  ],
+    }],  # OS=="ios"
+    ['OS=="android"', {
+      'targets': [
+        {
+          'target_name': 'peerconnection_unittests_apk_target',
+          'type': 'none',
+          'dependencies': [
+            '<(apk_tests_path):peerconnection_unittests_apk',
+          ],
+        },
+      ],
+    }],  # OS=="android"
+    ['test_isolation_mode != "noop"', {
+      'targets': [
+        {
+          'target_name': 'peerconnection_unittests_run',
+          'type': 'none',
+          'dependencies': [
+            'peerconnection_unittests',
+          ],
+          'includes': [
+            '../build/isolate.gypi',
+          ],
+          'sources': [
+            'peerconnection_unittests.isolate',
+          ],
+        },
+      ],  # targets
+    }],  # test_isolation_mode != "noop"
+  ],  # conditions
 }
diff --git a/talk/app/webrtc/audiotrack.cc b/webrtc/api/audiotrack.cc
similarity index 97%
rename from talk/app/webrtc/audiotrack.cc
rename to webrtc/api/audiotrack.cc
index b3223cd..1ae0535 100644
--- a/talk/app/webrtc/audiotrack.cc
+++ b/webrtc/api/audiotrack.cc
@@ -1,6 +1,6 @@
 /*
  * libjingle
- * Copyright 2004--2011 Google Inc.
+ * Copyright 2011 Google Inc.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -25,7 +25,7 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/audiotrack.h"
+#include "webrtc/api/audiotrack.h"
 
 #include "webrtc/base/checks.h"
 
diff --git a/talk/app/webrtc/audiotrack.h b/webrtc/api/audiotrack.h
similarity index 90%
rename from talk/app/webrtc/audiotrack.h
rename to webrtc/api/audiotrack.h
index 55f4837..87fc41f 100644
--- a/talk/app/webrtc/audiotrack.h
+++ b/webrtc/api/audiotrack.h
@@ -25,14 +25,14 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_AUDIOTRACK_H_
-#define TALK_APP_WEBRTC_AUDIOTRACK_H_
+#ifndef WEBRTC_API_AUDIOTRACK_H_
+#define WEBRTC_API_AUDIOTRACK_H_
 
 #include <string>
 
-#include "talk/app/webrtc/mediastreaminterface.h"
-#include "talk/app/webrtc/mediastreamtrack.h"
-#include "talk/app/webrtc/notifier.h"
+#include "webrtc/api/mediastreaminterface.h"
+#include "webrtc/api/mediastreamtrack.h"
+#include "webrtc/api/notifier.h"
 #include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/scoped_ref_ptr.h"
 #include "webrtc/base/thread_checker.h"
@@ -73,4 +73,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_AUDIOTRACK_H_
+#endif  // WEBRTC_API_AUDIOTRACK_H_
diff --git a/talk/app/webrtc/datachannel.cc b/webrtc/api/datachannel.cc
similarity index 98%
rename from talk/app/webrtc/datachannel.cc
rename to webrtc/api/datachannel.cc
index 05fa5ec..855831a 100644
--- a/talk/app/webrtc/datachannel.cc
+++ b/webrtc/api/datachannel.cc
@@ -25,12 +25,12 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/datachannel.h"
+#include "webrtc/api/datachannel.h"
 
 #include <string>
 
-#include "talk/app/webrtc/mediastreamprovider.h"
-#include "talk/app/webrtc/sctputils.h"
+#include "webrtc/api/mediastreamprovider.h"
+#include "webrtc/api/sctputils.h"
 #include "webrtc/base/logging.h"
 #include "webrtc/base/refcount.h"
 #include "webrtc/media/sctp/sctpdataengine.h"
diff --git a/talk/app/webrtc/datachannel.h b/webrtc/api/datachannel.h
similarity index 97%
rename from talk/app/webrtc/datachannel.h
rename to webrtc/api/datachannel.h
index 00e0886..649cb24 100644
--- a/talk/app/webrtc/datachannel.h
+++ b/webrtc/api/datachannel.h
@@ -25,16 +25,16 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_DATACHANNEL_H_
-#define TALK_APP_WEBRTC_DATACHANNEL_H_
+#ifndef WEBRTC_API_DATACHANNEL_H_
+#define WEBRTC_API_DATACHANNEL_H_
 
 #include <deque>
 #include <set>
 #include <string>
 
-#include "talk/app/webrtc/datachannelinterface.h"
-#include "talk/app/webrtc/proxy.h"
 #include "talk/session/media/channel.h"
+#include "webrtc/api/datachannelinterface.h"
+#include "webrtc/api/proxy.h"
 #include "webrtc/base/messagehandler.h"
 #include "webrtc/base/scoped_ref_ptr.h"
 #include "webrtc/base/sigslot.h"
@@ -296,4 +296,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_DATACHANNEL_H_
+#endif  // WEBRTC_API_DATACHANNEL_H_
diff --git a/talk/app/webrtc/datachannel_unittest.cc b/webrtc/api/datachannel_unittest.cc
similarity index 98%
rename from talk/app/webrtc/datachannel_unittest.cc
rename to webrtc/api/datachannel_unittest.cc
index ff79541..d5711e8 100644
--- a/talk/app/webrtc/datachannel_unittest.cc
+++ b/webrtc/api/datachannel_unittest.cc
@@ -25,9 +25,9 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/datachannel.h"
-#include "talk/app/webrtc/sctputils.h"
-#include "talk/app/webrtc/test/fakedatachannelprovider.h"
+#include "webrtc/api/datachannel.h"
+#include "webrtc/api/sctputils.h"
+#include "webrtc/api/test/fakedatachannelprovider.h"
 #include "webrtc/base/gunit.h"
 
 using webrtc::DataChannel;
diff --git a/talk/app/webrtc/datachannelinterface.h b/webrtc/api/datachannelinterface.h
similarity index 97%
rename from talk/app/webrtc/datachannelinterface.h
rename to webrtc/api/datachannelinterface.h
index d70972f..e291328 100644
--- a/talk/app/webrtc/datachannelinterface.h
+++ b/webrtc/api/datachannelinterface.h
@@ -28,8 +28,8 @@
 // This file contains interfaces for DataChannels
 // http://dev.w3.org/2011/webrtc/editor/webrtc.html#rtcdatachannel
 
-#ifndef TALK_APP_WEBRTC_DATACHANNELINTERFACE_H_
-#define TALK_APP_WEBRTC_DATACHANNELINTERFACE_H_
+#ifndef WEBRTC_API_DATACHANNELINTERFACE_H_
+#define WEBRTC_API_DATACHANNELINTERFACE_H_
 
 #include <string>
 
@@ -156,4 +156,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_DATACHANNELINTERFACE_H_
+#endif  // WEBRTC_API_DATACHANNELINTERFACE_H_
diff --git a/talk/app/webrtc/dtlsidentitystore.cc b/webrtc/api/dtlsidentitystore.cc
similarity index 98%
rename from talk/app/webrtc/dtlsidentitystore.cc
rename to webrtc/api/dtlsidentitystore.cc
index 390ec0d..79c2075 100644
--- a/talk/app/webrtc/dtlsidentitystore.cc
+++ b/webrtc/api/dtlsidentitystore.cc
@@ -25,11 +25,11 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/dtlsidentitystore.h"
+#include "webrtc/api/dtlsidentitystore.h"
 
 #include <utility>
 
-#include "talk/app/webrtc/webrtcsessiondescriptionfactory.h"
+#include "webrtc/api/webrtcsessiondescriptionfactory.h"
 #include "webrtc/base/logging.h"
 
 using webrtc::DtlsIdentityRequestObserver;
diff --git a/talk/app/webrtc/dtlsidentitystore.h b/webrtc/api/dtlsidentitystore.h
similarity index 97%
rename from talk/app/webrtc/dtlsidentitystore.h
rename to webrtc/api/dtlsidentitystore.h
index 2a5309d..9313b996 100644
--- a/talk/app/webrtc/dtlsidentitystore.h
+++ b/webrtc/api/dtlsidentitystore.h
@@ -25,8 +25,8 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_DTLSIDENTITYSTORE_H_
-#define TALK_APP_WEBRTC_DTLSIDENTITYSTORE_H_
+#ifndef WEBRTC_API_DTLSIDENTITYSTORE_H_
+#define WEBRTC_API_DTLSIDENTITYSTORE_H_
 
 #include <queue>
 #include <string>
@@ -162,4 +162,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_DTLSIDENTITYSTORE_H_
+#endif  // WEBRTC_API_DTLSIDENTITYSTORE_H_
diff --git a/talk/app/webrtc/dtlsidentitystore_unittest.cc b/webrtc/api/dtlsidentitystore_unittest.cc
similarity index 97%
rename from talk/app/webrtc/dtlsidentitystore_unittest.cc
rename to webrtc/api/dtlsidentitystore_unittest.cc
index e924221..f96cf57 100644
--- a/talk/app/webrtc/dtlsidentitystore_unittest.cc
+++ b/webrtc/api/dtlsidentitystore_unittest.cc
@@ -25,9 +25,9 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/dtlsidentitystore.h"
+#include "webrtc/api/dtlsidentitystore.h"
 
-#include "talk/app/webrtc/webrtcsessiondescriptionfactory.h"
+#include "webrtc/api/webrtcsessiondescriptionfactory.h"
 #include "webrtc/base/gunit.h"
 #include "webrtc/base/logging.h"
 #include "webrtc/base/ssladapter.h"
diff --git a/talk/app/webrtc/dtmfsender.cc b/webrtc/api/dtmfsender.cc
similarity index 99%
rename from talk/app/webrtc/dtmfsender.cc
rename to webrtc/api/dtmfsender.cc
index 30e2ce3..a10305c 100644
--- a/talk/app/webrtc/dtmfsender.cc
+++ b/webrtc/api/dtmfsender.cc
@@ -25,7 +25,7 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/dtmfsender.h"
+#include "webrtc/api/dtmfsender.h"
 
 #include <ctype.h>
 
diff --git a/talk/app/webrtc/dtmfsender.h b/webrtc/api/dtmfsender.h
similarity index 94%
rename from talk/app/webrtc/dtmfsender.h
rename to webrtc/api/dtmfsender.h
index 6d23610..f0f0e68 100644
--- a/talk/app/webrtc/dtmfsender.h
+++ b/webrtc/api/dtmfsender.h
@@ -25,14 +25,14 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_DTMFSENDER_H_
-#define TALK_APP_WEBRTC_DTMFSENDER_H_
+#ifndef WEBRTC_API_DTMFSENDER_H_
+#define WEBRTC_API_DTMFSENDER_H_
 
 #include <string>
 
-#include "talk/app/webrtc/dtmfsenderinterface.h"
-#include "talk/app/webrtc/mediastreaminterface.h"
-#include "talk/app/webrtc/proxy.h"
+#include "webrtc/api/dtmfsenderinterface.h"
+#include "webrtc/api/mediastreaminterface.h"
+#include "webrtc/api/proxy.h"
 #include "webrtc/base/common.h"
 #include "webrtc/base/messagehandler.h"
 #include "webrtc/base/refcount.h"
@@ -136,4 +136,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_DTMFSENDER_H_
+#endif  // WEBRTC_API_DTMFSENDER_H_
diff --git a/talk/app/webrtc/dtmfsender_unittest.cc b/webrtc/api/dtmfsender_unittest.cc
similarity index 98%
rename from talk/app/webrtc/dtmfsender_unittest.cc
rename to webrtc/api/dtmfsender_unittest.cc
index f686aa2..e754ca2 100644
--- a/talk/app/webrtc/dtmfsender_unittest.cc
+++ b/webrtc/api/dtmfsender_unittest.cc
@@ -25,13 +25,13 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/dtmfsender.h"
+#include "webrtc/api/dtmfsender.h"
 
 #include <set>
 #include <string>
 #include <vector>
 
-#include "talk/app/webrtc/audiotrack.h"
+#include "webrtc/api/audiotrack.h"
 #include "webrtc/base/gunit.h"
 #include "webrtc/base/logging.h"
 #include "webrtc/base/timeutils.h"
diff --git a/talk/app/webrtc/dtmfsenderinterface.h b/webrtc/api/dtmfsenderinterface.h
similarity index 95%
rename from talk/app/webrtc/dtmfsenderinterface.h
rename to webrtc/api/dtmfsenderinterface.h
index 7fbf57a..327c673 100644
--- a/talk/app/webrtc/dtmfsenderinterface.h
+++ b/webrtc/api/dtmfsenderinterface.h
@@ -25,12 +25,12 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_DTMFSENDERINTERFACE_H_
-#define TALK_APP_WEBRTC_DTMFSENDERINTERFACE_H_
+#ifndef WEBRTC_API_DTMFSENDERINTERFACE_H_
+#define WEBRTC_API_DTMFSENDERINTERFACE_H_
 
 #include <string>
 
-#include "talk/app/webrtc/mediastreaminterface.h"
+#include "webrtc/api/mediastreaminterface.h"
 #include "webrtc/base/common.h"
 #include "webrtc/base/refcount.h"
 
@@ -102,4 +102,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_DTMFSENDERINTERFACE_H_
+#endif  // WEBRTC_API_DTMFSENDERINTERFACE_H_
diff --git a/talk/app/webrtc/fakemediacontroller.h b/webrtc/api/fakemediacontroller.h
similarity index 91%
rename from talk/app/webrtc/fakemediacontroller.h
rename to webrtc/api/fakemediacontroller.h
index 5bf3e5f..ec1bd12 100644
--- a/talk/app/webrtc/fakemediacontroller.h
+++ b/webrtc/api/fakemediacontroller.h
@@ -25,10 +25,10 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_FAKEMEDIACONTROLLER_H_
-#define TALK_APP_WEBRTC_FAKEMEDIACONTROLLER_H_
+#ifndef WEBRTC_API_FAKEMEDIACONTROLLER_H_
+#define WEBRTC_API_FAKEMEDIACONTROLLER_H_
 
-#include "talk/app/webrtc/mediacontroller.h"
+#include "webrtc/api/mediacontroller.h"
 #include "webrtc/base/checks.h"
 
 namespace cricket {
@@ -52,4 +52,4 @@
   webrtc::Call* call_;
 };
 }  // namespace cricket
-#endif  // TALK_APP_WEBRTC_FAKEMEDIACONTROLLER_H_
+#endif  // WEBRTC_API_FAKEMEDIACONTROLLER_H_
diff --git a/talk/app/webrtc/fakemetricsobserver.cc b/webrtc/api/fakemetricsobserver.cc
similarity index 97%
rename from talk/app/webrtc/fakemetricsobserver.cc
rename to webrtc/api/fakemetricsobserver.cc
index 4a100a0..6070ff41 100644
--- a/talk/app/webrtc/fakemetricsobserver.cc
+++ b/webrtc/api/fakemetricsobserver.cc
@@ -25,7 +25,7 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/fakemetricsobserver.h"
+#include "webrtc/api/fakemetricsobserver.h"
 #include "webrtc/base/checks.h"
 
 namespace webrtc {
diff --git a/talk/app/webrtc/fakemetricsobserver.h b/webrtc/api/fakemetricsobserver.h
similarity index 92%
rename from talk/app/webrtc/fakemetricsobserver.h
rename to webrtc/api/fakemetricsobserver.h
index e3a2284..1f4c2ab 100644
--- a/talk/app/webrtc/fakemetricsobserver.h
+++ b/webrtc/api/fakemetricsobserver.h
@@ -25,13 +25,13 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_FAKEMETRICSOBSERVER_H_
-#define TALK_APP_WEBRTC_FAKEMETRICSOBSERVER_H_
+#ifndef WEBRTC_API_FAKEMETRICSOBSERVER_H_
+#define WEBRTC_API_FAKEMETRICSOBSERVER_H_
 
 #include <map>
 #include <string>
 
-#include "talk/app/webrtc/peerconnectioninterface.h"
+#include "webrtc/api/peerconnectioninterface.h"
 #include "webrtc/base/thread_checker.h"
 
 namespace webrtc {
@@ -65,4 +65,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_FAKEMETRICSOBSERVER_H_
+#endif  // WEBRTC_API_FAKEMETRICSOBSERVER_H_
diff --git a/talk/app/webrtc/java/README b/webrtc/api/java/README
similarity index 100%
rename from talk/app/webrtc/java/README
rename to webrtc/api/java/README
diff --git a/talk/app/webrtc/java/android/org/webrtc/Camera2Enumerator.java b/webrtc/api/java/android/org/webrtc/Camera2Enumerator.java
similarity index 100%
rename from talk/app/webrtc/java/android/org/webrtc/Camera2Enumerator.java
rename to webrtc/api/java/android/org/webrtc/Camera2Enumerator.java
diff --git a/talk/app/webrtc/java/android/org/webrtc/CameraEnumerationAndroid.java b/webrtc/api/java/android/org/webrtc/CameraEnumerationAndroid.java
similarity index 100%
rename from talk/app/webrtc/java/android/org/webrtc/CameraEnumerationAndroid.java
rename to webrtc/api/java/android/org/webrtc/CameraEnumerationAndroid.java
diff --git a/talk/app/webrtc/java/android/org/webrtc/CameraEnumerator.java b/webrtc/api/java/android/org/webrtc/CameraEnumerator.java
similarity index 100%
rename from talk/app/webrtc/java/android/org/webrtc/CameraEnumerator.java
rename to webrtc/api/java/android/org/webrtc/CameraEnumerator.java
diff --git a/talk/app/webrtc/java/android/org/webrtc/EglBase.java b/webrtc/api/java/android/org/webrtc/EglBase.java
similarity index 100%
rename from talk/app/webrtc/java/android/org/webrtc/EglBase.java
rename to webrtc/api/java/android/org/webrtc/EglBase.java
diff --git a/talk/app/webrtc/java/android/org/webrtc/EglBase10.java b/webrtc/api/java/android/org/webrtc/EglBase10.java
similarity index 100%
rename from talk/app/webrtc/java/android/org/webrtc/EglBase10.java
rename to webrtc/api/java/android/org/webrtc/EglBase10.java
diff --git a/talk/app/webrtc/java/android/org/webrtc/EglBase14.java b/webrtc/api/java/android/org/webrtc/EglBase14.java
similarity index 100%
rename from talk/app/webrtc/java/android/org/webrtc/EglBase14.java
rename to webrtc/api/java/android/org/webrtc/EglBase14.java
diff --git a/talk/app/webrtc/java/android/org/webrtc/GlRectDrawer.java b/webrtc/api/java/android/org/webrtc/GlRectDrawer.java
similarity index 100%
rename from talk/app/webrtc/java/android/org/webrtc/GlRectDrawer.java
rename to webrtc/api/java/android/org/webrtc/GlRectDrawer.java
diff --git a/talk/app/webrtc/java/android/org/webrtc/GlShader.java b/webrtc/api/java/android/org/webrtc/GlShader.java
similarity index 100%
rename from talk/app/webrtc/java/android/org/webrtc/GlShader.java
rename to webrtc/api/java/android/org/webrtc/GlShader.java
diff --git a/talk/app/webrtc/java/android/org/webrtc/GlTextureFrameBuffer.java b/webrtc/api/java/android/org/webrtc/GlTextureFrameBuffer.java
similarity index 100%
rename from talk/app/webrtc/java/android/org/webrtc/GlTextureFrameBuffer.java
rename to webrtc/api/java/android/org/webrtc/GlTextureFrameBuffer.java
diff --git a/talk/app/webrtc/java/android/org/webrtc/GlUtil.java b/webrtc/api/java/android/org/webrtc/GlUtil.java
similarity index 100%
rename from talk/app/webrtc/java/android/org/webrtc/GlUtil.java
rename to webrtc/api/java/android/org/webrtc/GlUtil.java
diff --git a/talk/app/webrtc/java/android/org/webrtc/NetworkMonitor.java b/webrtc/api/java/android/org/webrtc/NetworkMonitor.java
similarity index 100%
rename from talk/app/webrtc/java/android/org/webrtc/NetworkMonitor.java
rename to webrtc/api/java/android/org/webrtc/NetworkMonitor.java
diff --git a/talk/app/webrtc/java/android/org/webrtc/NetworkMonitorAutoDetect.java b/webrtc/api/java/android/org/webrtc/NetworkMonitorAutoDetect.java
similarity index 100%
rename from talk/app/webrtc/java/android/org/webrtc/NetworkMonitorAutoDetect.java
rename to webrtc/api/java/android/org/webrtc/NetworkMonitorAutoDetect.java
diff --git a/talk/app/webrtc/java/android/org/webrtc/OWNERS b/webrtc/api/java/android/org/webrtc/OWNERS
similarity index 100%
rename from talk/app/webrtc/java/android/org/webrtc/OWNERS
rename to webrtc/api/java/android/org/webrtc/OWNERS
diff --git a/talk/app/webrtc/java/android/org/webrtc/RendererCommon.java b/webrtc/api/java/android/org/webrtc/RendererCommon.java
similarity index 100%
rename from talk/app/webrtc/java/android/org/webrtc/RendererCommon.java
rename to webrtc/api/java/android/org/webrtc/RendererCommon.java
diff --git a/talk/app/webrtc/java/android/org/webrtc/SurfaceTextureHelper.java b/webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java
similarity index 100%
rename from talk/app/webrtc/java/android/org/webrtc/SurfaceTextureHelper.java
rename to webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java
diff --git a/talk/app/webrtc/java/android/org/webrtc/SurfaceViewRenderer.java b/webrtc/api/java/android/org/webrtc/SurfaceViewRenderer.java
similarity index 100%
rename from talk/app/webrtc/java/android/org/webrtc/SurfaceViewRenderer.java
rename to webrtc/api/java/android/org/webrtc/SurfaceViewRenderer.java
diff --git a/talk/app/webrtc/java/android/org/webrtc/ThreadUtils.java b/webrtc/api/java/android/org/webrtc/ThreadUtils.java
similarity index 100%
rename from talk/app/webrtc/java/android/org/webrtc/ThreadUtils.java
rename to webrtc/api/java/android/org/webrtc/ThreadUtils.java
diff --git a/talk/app/webrtc/java/android/org/webrtc/VideoCapturerAndroid.java b/webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java
similarity index 100%
rename from talk/app/webrtc/java/android/org/webrtc/VideoCapturerAndroid.java
rename to webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java
diff --git a/talk/app/webrtc/java/android/org/webrtc/VideoRendererGui.java b/webrtc/api/java/android/org/webrtc/VideoRendererGui.java
similarity index 100%
rename from talk/app/webrtc/java/android/org/webrtc/VideoRendererGui.java
rename to webrtc/api/java/android/org/webrtc/VideoRendererGui.java
diff --git a/talk/app/webrtc/java/jni/OWNERS b/webrtc/api/java/jni/OWNERS
similarity index 100%
rename from talk/app/webrtc/java/jni/OWNERS
rename to webrtc/api/java/jni/OWNERS
diff --git a/talk/app/webrtc/java/jni/androidmediacodeccommon.h b/webrtc/api/java/jni/androidmediacodeccommon.h
similarity index 93%
rename from talk/app/webrtc/java/jni/androidmediacodeccommon.h
rename to webrtc/api/java/jni/androidmediacodeccommon.h
index 329aa2a..7044fb4 100644
--- a/talk/app/webrtc/java/jni/androidmediacodeccommon.h
+++ b/webrtc/api/java/jni/androidmediacodeccommon.h
@@ -26,15 +26,15 @@
  *
  */
 
-#ifndef TALK_APP_WEBRTC_JAVA_JNI_ANDROIDMEDIACODECCOMMON_H_
-#define TALK_APP_WEBRTC_JAVA_JNI_ANDROIDMEDIACODECCOMMON_H_
+#ifndef WEBRTC_API_JAVA_JNI_ANDROIDMEDIACODECCOMMON_H_
+#define WEBRTC_API_JAVA_JNI_ANDROIDMEDIACODECCOMMON_H_
 
 #include <android/log.h>
 #include <string>
 
-#include "talk/app/webrtc/java/jni/classreferenceholder.h"
-#include "talk/app/webrtc/java/jni/jni_helpers.h"
 #include "webrtc/base/thread.h"
+#include "webrtc/api/java/jni/classreferenceholder.h"
+#include "webrtc/api/java/jni/jni_helpers.h"
 #include "webrtc/base/logging.h"
 #include "webrtc/base/thread.h"
 #include "webrtc/system_wrappers/include/tick_util.h"
@@ -110,4 +110,4 @@
 
 }  // namespace webrtc_jni
 
-#endif  // TALK_APP_WEBRTC_JAVA_JNI_ANDROIDMEDIACODECCOMMON_H_
+#endif  // WEBRTC_API_JAVA_JNI_ANDROIDMEDIACODECCOMMON_H_
diff --git a/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc b/webrtc/api/java/jni/androidmediadecoder_jni.cc
similarity index 98%
rename from talk/app/webrtc/java/jni/androidmediadecoder_jni.cc
rename to webrtc/api/java/jni/androidmediadecoder_jni.cc
index a462b6c..b9973be 100644
--- a/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc
+++ b/webrtc/api/java/jni/androidmediadecoder_jni.cc
@@ -29,16 +29,17 @@
 #include <algorithm>
 #include <vector>
 
-#include "talk/app/webrtc/java/jni/androidmediadecoder_jni.h"
 // NOTICE: androidmediadecoder_jni.h must be included before
 // androidmediacodeccommon.h to avoid build errors.
-#include "talk/app/webrtc/java/jni/androidmediacodeccommon.h"
-#include "talk/app/webrtc/java/jni/classreferenceholder.h"
-#include "talk/app/webrtc/java/jni/native_handle_impl.h"
-#include "talk/app/webrtc/java/jni/surfacetexturehelper_jni.h"
+#include "webrtc/api/java/jni/androidmediadecoder_jni.h"
+
 #include "third_party/libyuv/include/libyuv/convert.h"
 #include "third_party/libyuv/include/libyuv/convert_from.h"
 #include "third_party/libyuv/include/libyuv/video_common.h"
+#include "webrtc/api/java/jni/androidmediacodeccommon.h"
+#include "webrtc/api/java/jni/classreferenceholder.h"
+#include "webrtc/api/java/jni/native_handle_impl.h"
+#include "webrtc/api/java/jni/surfacetexturehelper_jni.h"
 #include "webrtc/base/bind.h"
 #include "webrtc/base/checks.h"
 #include "webrtc/base/logging.h"
diff --git a/talk/app/webrtc/java/jni/androidmediadecoder_jni.h b/webrtc/api/java/jni/androidmediadecoder_jni.h
similarity index 90%
rename from talk/app/webrtc/java/jni/androidmediadecoder_jni.h
rename to webrtc/api/java/jni/androidmediadecoder_jni.h
index b25ec13..c79490e 100644
--- a/talk/app/webrtc/java/jni/androidmediadecoder_jni.h
+++ b/webrtc/api/java/jni/androidmediadecoder_jni.h
@@ -26,10 +26,10 @@
  *
  */
 
-#ifndef TALK_APP_WEBRTC_JAVA_JNI_ANDROIDMEDIADECODER_JNI_H_
-#define TALK_APP_WEBRTC_JAVA_JNI_ANDROIDMEDIADECODER_JNI_H_
+#ifndef WEBRTC_API_JAVA_JNI_ANDROIDMEDIADECODER_JNI_H_
+#define WEBRTC_API_JAVA_JNI_ANDROIDMEDIADECODER_JNI_H_
 
-#include "talk/app/webrtc/java/jni/eglbase_jni.h"
+#include "webrtc/api/java/jni/eglbase_jni.h"
 #include "webrtc/media/webrtc/webrtcvideodecoderfactory.h"
 
 namespace webrtc_jni {
@@ -56,4 +56,4 @@
 
 }  // namespace webrtc_jni
 
-#endif  // TALK_APP_WEBRTC_JAVA_JNI_ANDROIDMEDIADECODER_JNI_H_
+#endif  // WEBRTC_API_JAVA_JNI_ANDROIDMEDIADECODER_JNI_H_
diff --git a/talk/app/webrtc/java/jni/androidmediaencoder_jni.cc b/webrtc/api/java/jni/androidmediaencoder_jni.cc
similarity index 99%
rename from talk/app/webrtc/java/jni/androidmediaencoder_jni.cc
rename to webrtc/api/java/jni/androidmediaencoder_jni.cc
index aade95b..a06b026 100644
--- a/talk/app/webrtc/java/jni/androidmediaencoder_jni.cc
+++ b/webrtc/api/java/jni/androidmediaencoder_jni.cc
@@ -26,15 +26,16 @@
  *
  */
 
-#include "talk/app/webrtc/java/jni/androidmediaencoder_jni.h"
 // NOTICE: androidmediaencoder_jni.h must be included before
 // androidmediacodeccommon.h to avoid build errors.
-#include "talk/app/webrtc/java/jni/androidmediacodeccommon.h"
-#include "talk/app/webrtc/java/jni/classreferenceholder.h"
-#include "talk/app/webrtc/java/jni/native_handle_impl.h"
+#include "webrtc/api/java/jni/androidmediaencoder_jni.h"
+
 #include "third_party/libyuv/include/libyuv/convert.h"
 #include "third_party/libyuv/include/libyuv/convert_from.h"
 #include "third_party/libyuv/include/libyuv/video_common.h"
+#include "webrtc/api/java/jni/androidmediacodeccommon.h"
+#include "webrtc/api/java/jni/classreferenceholder.h"
+#include "webrtc/api/java/jni/native_handle_impl.h"
 #include "webrtc/base/bind.h"
 #include "webrtc/base/checks.h"
 #include "webrtc/base/logging.h"
diff --git a/talk/app/webrtc/java/jni/androidmediaencoder_jni.h b/webrtc/api/java/jni/androidmediaencoder_jni.h
similarity index 90%
rename from talk/app/webrtc/java/jni/androidmediaencoder_jni.h
rename to webrtc/api/java/jni/androidmediaencoder_jni.h
index 3d361d2..e96a489 100644
--- a/talk/app/webrtc/java/jni/androidmediaencoder_jni.h
+++ b/webrtc/api/java/jni/androidmediaencoder_jni.h
@@ -26,12 +26,12 @@
  *
  */
 
-#ifndef TALK_APP_WEBRTC_JAVA_JNI_ANDROIDMEDIAENCODER_JNI_H_
-#define TALK_APP_WEBRTC_JAVA_JNI_ANDROIDMEDIAENCODER_JNI_H_
+#ifndef WEBRTC_API_JAVA_JNI_ANDROIDMEDIAENCODER_JNI_H_
+#define WEBRTC_API_JAVA_JNI_ANDROIDMEDIAENCODER_JNI_H_
 
 #include <vector>
 
-#include "talk/app/webrtc/java/jni/eglbase_jni.h"
+#include "webrtc/api/java/jni/eglbase_jni.h"
 #include "webrtc/media/webrtc/webrtcvideoencoderfactory.h"
 
 namespace webrtc_jni {
@@ -60,4 +60,4 @@
 
 }  // namespace webrtc_jni
 
-#endif  // TALK_APP_WEBRTC_JAVA_JNI_ANDROIDMEDIAENCODER_JNI_H_
+#endif  // WEBRTC_API_JAVA_JNI_ANDROIDMEDIAENCODER_JNI_H_
diff --git a/talk/app/webrtc/java/jni/androidnetworkmonitor_jni.cc b/webrtc/api/java/jni/androidnetworkmonitor_jni.cc
similarity index 98%
rename from talk/app/webrtc/java/jni/androidnetworkmonitor_jni.cc
rename to webrtc/api/java/jni/androidnetworkmonitor_jni.cc
index 69870dc..a38fa11 100644
--- a/talk/app/webrtc/java/jni/androidnetworkmonitor_jni.cc
+++ b/webrtc/api/java/jni/androidnetworkmonitor_jni.cc
@@ -25,12 +25,12 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/java/jni/androidnetworkmonitor_jni.h"
+#include "webrtc/api/java/jni/androidnetworkmonitor_jni.h"
 
 #include <dlfcn.h>
 
-#include "talk/app/webrtc/java/jni/classreferenceholder.h"
-#include "talk/app/webrtc/java/jni/jni_helpers.h"
+#include "webrtc/api/java/jni/classreferenceholder.h"
+#include "webrtc/api/java/jni/jni_helpers.h"
 #include "webrtc/base/bind.h"
 #include "webrtc/base/common.h"
 #include "webrtc/base/ipaddress.h"
diff --git a/talk/app/webrtc/java/jni/androidnetworkmonitor_jni.h b/webrtc/api/java/jni/androidnetworkmonitor_jni.h
similarity index 93%
rename from talk/app/webrtc/java/jni/androidnetworkmonitor_jni.h
rename to webrtc/api/java/jni/androidnetworkmonitor_jni.h
index 39898ea..220a5bc 100644
--- a/talk/app/webrtc/java/jni/androidnetworkmonitor_jni.h
+++ b/webrtc/api/java/jni/androidnetworkmonitor_jni.h
@@ -25,14 +25,14 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_JAVA_JNI_ANDROIDNETWORKMONITOR_JNI_H_
-#define TALK_APP_WEBRTC_JAVA_JNI_ANDROIDNETWORKMONITOR_JNI_H_
+#ifndef WEBRTC_API_JAVA_JNI_ANDROIDNETWORKMONITOR_JNI_H_
+#define WEBRTC_API_JAVA_JNI_ANDROIDNETWORKMONITOR_JNI_H_
 
 #include "webrtc/base/networkmonitor.h"
 
 #include <map>
 
-#include "talk/app/webrtc/java/jni/jni_helpers.h"
+#include "webrtc/api/java/jni/jni_helpers.h"
 #include "webrtc/base/basictypes.h"
 #include "webrtc/base/thread_checker.h"
 
@@ -105,4 +105,4 @@
 
 }  // namespace webrtc_jni
 
-#endif  // TALK_APP_WEBRTC_JAVA_JNI_ANDROIDNETWORKMONITOR_JNI_H_
+#endif  // WEBRTC_API_JAVA_JNI_ANDROIDNETWORKMONITOR_JNI_H_
diff --git a/talk/app/webrtc/java/jni/androidvideocapturer_jni.cc b/webrtc/api/java/jni/androidvideocapturer_jni.cc
similarity index 97%
rename from talk/app/webrtc/java/jni/androidvideocapturer_jni.cc
rename to webrtc/api/java/jni/androidvideocapturer_jni.cc
index 8813c89..a636d62 100644
--- a/talk/app/webrtc/java/jni/androidvideocapturer_jni.cc
+++ b/webrtc/api/java/jni/androidvideocapturer_jni.cc
@@ -26,10 +26,10 @@
  *
  */
 
-#include "talk/app/webrtc/java/jni/androidvideocapturer_jni.h"
-#include "talk/app/webrtc/java/jni/classreferenceholder.h"
-#include "talk/app/webrtc/java/jni/native_handle_impl.h"
-#include "talk/app/webrtc/java/jni/surfacetexturehelper_jni.h"
+#include "webrtc/api/java/jni/androidvideocapturer_jni.h"
+#include "webrtc/api/java/jni/classreferenceholder.h"
+#include "webrtc/api/java/jni/native_handle_impl.h"
+#include "webrtc/api/java/jni/surfacetexturehelper_jni.h"
 #include "third_party/libyuv/include/libyuv/convert.h"
 #include "webrtc/base/bind.h"
 
diff --git a/talk/app/webrtc/java/jni/androidvideocapturer_jni.h b/webrtc/api/java/jni/androidvideocapturer_jni.h
similarity index 93%
rename from talk/app/webrtc/java/jni/androidvideocapturer_jni.h
rename to webrtc/api/java/jni/androidvideocapturer_jni.h
index 89ecacb..bf611f5 100644
--- a/talk/app/webrtc/java/jni/androidvideocapturer_jni.h
+++ b/webrtc/api/java/jni/androidvideocapturer_jni.h
@@ -26,13 +26,13 @@
  *
  */
 
-#ifndef TALK_APP_WEBRTC_JAVA_JNI_ANDROIDVIDEOCAPTURER_JNI_H_
-#define TALK_APP_WEBRTC_JAVA_JNI_ANDROIDVIDEOCAPTURER_JNI_H_
+#ifndef WEBRTC_API_JAVA_JNI_ANDROIDVIDEOCAPTURER_JNI_H_
+#define WEBRTC_API_JAVA_JNI_ANDROIDVIDEOCAPTURER_JNI_H_
 
 #include <string>
 
-#include "talk/app/webrtc/androidvideocapturer.h"
-#include "talk/app/webrtc/java/jni/jni_helpers.h"
+#include "webrtc/api/androidvideocapturer.h"
+#include "webrtc/api/java/jni/jni_helpers.h"
 #include "webrtc/base/asyncinvoker.h"
 #include "webrtc/base/criticalsection.h"
 #include "webrtc/base/thread_checker.h"
@@ -113,4 +113,4 @@
 
 }  // namespace webrtc_jni
 
-#endif  // TALK_APP_WEBRTC_JAVA_JNI_ANDROIDVIDEOCAPTURER_JNI_H_
+#endif  // WEBRTC_API_JAVA_JNI_ANDROIDVIDEOCAPTURER_JNI_H_
diff --git a/talk/app/webrtc/java/jni/classreferenceholder.cc b/webrtc/api/java/jni/classreferenceholder.cc
similarity index 97%
rename from talk/app/webrtc/java/jni/classreferenceholder.cc
rename to webrtc/api/java/jni/classreferenceholder.cc
index 0d52bc5..0625cc2 100644
--- a/talk/app/webrtc/java/jni/classreferenceholder.cc
+++ b/webrtc/api/java/jni/classreferenceholder.cc
@@ -25,9 +25,9 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
-#include "talk/app/webrtc/java/jni/classreferenceholder.h"
+#include "webrtc/api/java/jni/classreferenceholder.h"
 
-#include "talk/app/webrtc/java/jni/jni_helpers.h"
+#include "webrtc/api/java/jni/jni_helpers.h"
 
 namespace webrtc_jni {
 
diff --git a/talk/app/webrtc/java/jni/classreferenceholder.h b/webrtc/api/java/jni/classreferenceholder.h
similarity index 93%
rename from talk/app/webrtc/java/jni/classreferenceholder.h
rename to webrtc/api/java/jni/classreferenceholder.h
index f345c1db..5edf614 100644
--- a/talk/app/webrtc/java/jni/classreferenceholder.h
+++ b/webrtc/api/java/jni/classreferenceholder.h
@@ -31,8 +31,8 @@
 // stack.  Consequently, we only look up all classes once in app/webrtc.
 // http://developer.android.com/training/articles/perf-jni.html#faq_FindClass
 
-#ifndef TALK_APP_WEBRTC_JAVA_JNI_CLASSREFERENCEHOLDER_H_
-#define TALK_APP_WEBRTC_JAVA_JNI_CLASSREFERENCEHOLDER_H_
+#ifndef WEBRTC_API_JAVA_JNI_CLASSREFERENCEHOLDER_H_
+#define WEBRTC_API_JAVA_JNI_CLASSREFERENCEHOLDER_H_
 
 #include <jni.h>
 #include <map>
@@ -56,4 +56,4 @@
 
 }  // namespace webrtc_jni
 
-#endif  // TALK_APP_WEBRTC_JAVA_JNI_CLASSREFERENCEHOLDER_H_
+#endif  // WEBRTC_API_JAVA_JNI_CLASSREFERENCEHOLDER_H_
diff --git a/talk/app/webrtc/java/jni/eglbase_jni.cc b/webrtc/api/java/jni/eglbase_jni.cc
similarity index 93%
rename from talk/app/webrtc/java/jni/eglbase_jni.cc
rename to webrtc/api/java/jni/eglbase_jni.cc
index b91aa39..26eeeb3 100644
--- a/talk/app/webrtc/java/jni/eglbase_jni.cc
+++ b/webrtc/api/java/jni/eglbase_jni.cc
@@ -26,11 +26,11 @@
  *
  */
 
-#include "talk/app/webrtc/java/jni/eglbase_jni.h"
+#include "webrtc/api/java/jni/eglbase_jni.h"
 
-#include "talk/app/webrtc/java/jni/androidmediacodeccommon.h"
-#include "talk/app/webrtc/java/jni/classreferenceholder.h"
-#include "talk/app/webrtc/java/jni/jni_helpers.h"
+#include "webrtc/api/java/jni/androidmediacodeccommon.h"
+#include "webrtc/api/java/jni/classreferenceholder.h"
+#include "webrtc/api/java/jni/jni_helpers.h"
 
 namespace webrtc_jni {
 
diff --git a/talk/app/webrtc/java/jni/eglbase_jni.h b/webrtc/api/java/jni/eglbase_jni.h
similarity index 93%
rename from talk/app/webrtc/java/jni/eglbase_jni.h
rename to webrtc/api/java/jni/eglbase_jni.h
index 1015d90..de7e39e 100644
--- a/talk/app/webrtc/java/jni/eglbase_jni.h
+++ b/webrtc/api/java/jni/eglbase_jni.h
@@ -26,8 +26,8 @@
  *
  */
 
-#ifndef TALK_APP_WEBRTC_JAVA_JNI_EGLBASE_JNI_H_
-#define TALK_APP_WEBRTC_JAVA_JNI_EGLBASE_JNI_H_
+#ifndef WEBRTC_API_JAVA_JNI_EGLBASE_JNI_H_
+#define WEBRTC_API_JAVA_JNI_EGLBASE_JNI_H_
 
 #include <jni.h>
 
@@ -57,4 +57,4 @@
 
 }  // namespace webrtc_jni
 
-#endif  // TALK_APP_WEBRTC_JAVA_JNI_EGLBASE_JNI_H_
+#endif  // WEBRTC_API_JAVA_JNI_EGLBASE_JNI_H_
diff --git a/talk/app/webrtc/java/jni/jni_helpers.cc b/webrtc/api/java/jni/jni_helpers.cc
similarity index 98%
rename from talk/app/webrtc/java/jni/jni_helpers.cc
rename to webrtc/api/java/jni/jni_helpers.cc
index 25b340f..b07a9c5 100644
--- a/talk/app/webrtc/java/jni/jni_helpers.cc
+++ b/webrtc/api/java/jni/jni_helpers.cc
@@ -25,9 +25,9 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
-#include "talk/app/webrtc/java/jni/jni_helpers.h"
+#include "webrtc/api/java/jni/jni_helpers.h"
 
-#include "talk/app/webrtc/java/jni/classreferenceholder.h"
+#include "webrtc/api/java/jni/classreferenceholder.h"
 
 #include <asm/unistd.h>
 #include <sys/prctl.h>
diff --git a/talk/app/webrtc/java/jni/jni_helpers.h b/webrtc/api/java/jni/jni_helpers.h
similarity index 96%
rename from talk/app/webrtc/java/jni/jni_helpers.h
rename to webrtc/api/java/jni/jni_helpers.h
index 374962b..5498158 100644
--- a/talk/app/webrtc/java/jni/jni_helpers.h
+++ b/webrtc/api/java/jni/jni_helpers.h
@@ -29,8 +29,8 @@
 // This file contain convenience functions and classes for JNI.
 // Before using any of the methods, InitGlobalJniVariables must be called.
 
-#ifndef TALK_APP_WEBRTC_JAVA_JNI_JNI_HELPERS_H_
-#define TALK_APP_WEBRTC_JAVA_JNI_JNI_HELPERS_H_
+#ifndef WEBRTC_API_JAVA_JNI_JNI_HELPERS_H_
+#define WEBRTC_API_JAVA_JNI_JNI_HELPERS_H_
 
 #include <jni.h>
 #include <string>
@@ -143,4 +143,4 @@
 
 }  // namespace webrtc_jni
 
-#endif  // TALK_APP_WEBRTC_JAVA_JNI_JNI_HELPERS_H_
+#endif  // WEBRTC_API_JAVA_JNI_JNI_HELPERS_H_
diff --git a/talk/app/webrtc/java/jni/jni_onload.cc b/webrtc/api/java/jni/jni_onload.cc
similarity index 94%
rename from talk/app/webrtc/java/jni/jni_onload.cc
rename to webrtc/api/java/jni/jni_onload.cc
index 9664ecd..af2804d 100644
--- a/talk/app/webrtc/java/jni/jni_onload.cc
+++ b/webrtc/api/java/jni/jni_onload.cc
@@ -29,8 +29,8 @@
 #undef JNIEXPORT
 #define JNIEXPORT __attribute__((visibility("default")))
 
-#include "talk/app/webrtc/java/jni/classreferenceholder.h"
-#include "talk/app/webrtc/java/jni/jni_helpers.h"
+#include "webrtc/api/java/jni/classreferenceholder.h"
+#include "webrtc/api/java/jni/jni_helpers.h"
 #include "webrtc/base/ssladapter.h"
 
 namespace webrtc_jni {
diff --git a/talk/app/webrtc/java/jni/native_handle_impl.cc b/webrtc/api/java/jni/native_handle_impl.cc
similarity index 98%
rename from talk/app/webrtc/java/jni/native_handle_impl.cc
rename to webrtc/api/java/jni/native_handle_impl.cc
index e253088..8ec549c 100644
--- a/talk/app/webrtc/java/jni/native_handle_impl.cc
+++ b/webrtc/api/java/jni/native_handle_impl.cc
@@ -25,9 +25,9 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/java/jni/native_handle_impl.h"
+#include "webrtc/api/java/jni/native_handle_impl.h"
 
-#include "talk/app/webrtc/java/jni/jni_helpers.h"
+#include "webrtc/api/java/jni/jni_helpers.h"
 #include "webrtc/base/bind.h"
 #include "webrtc/base/checks.h"
 #include "webrtc/base/keep_ref_until_done.h"
diff --git a/talk/app/webrtc/java/jni/native_handle_impl.h b/webrtc/api/java/jni/native_handle_impl.h
similarity index 94%
rename from talk/app/webrtc/java/jni/native_handle_impl.h
rename to webrtc/api/java/jni/native_handle_impl.h
index 1d0f601..4203bdf 100644
--- a/talk/app/webrtc/java/jni/native_handle_impl.h
+++ b/webrtc/api/java/jni/native_handle_impl.h
@@ -26,8 +26,8 @@
  *
  */
 
-#ifndef TALK_APP_WEBRTC_JAVA_JNI_NATIVE_HANDLE_IMPL_H_
-#define TALK_APP_WEBRTC_JAVA_JNI_NATIVE_HANDLE_IMPL_H_
+#ifndef WEBRTC_API_JAVA_JNI_NATIVE_HANDLE_IMPL_H_
+#define WEBRTC_API_JAVA_JNI_NATIVE_HANDLE_IMPL_H_
 
 #include <jni.h>
 
@@ -74,4 +74,4 @@
 
 }  // namespace webrtc_jni
 
-#endif  // TALK_APP_WEBRTC_JAVA_JNI_NATIVE_HANDLE_IMPL_H_
+#endif  // WEBRTC_API_JAVA_JNI_NATIVE_HANDLE_IMPL_H_
diff --git a/talk/app/webrtc/java/jni/peerconnection_jni.cc b/webrtc/api/java/jni/peerconnection_jni.cc
similarity index 98%
rename from talk/app/webrtc/java/jni/peerconnection_jni.cc
rename to webrtc/api/java/jni/peerconnection_jni.cc
index bbbd77f..1160b2b 100644
--- a/talk/app/webrtc/java/jni/peerconnection_jni.cc
+++ b/webrtc/api/java/jni/peerconnection_jni.cc
@@ -59,20 +59,20 @@
 #include <limits>
 #include <utility>
 
-#include "talk/app/webrtc/androidvideocapturer.h"
-#include "talk/app/webrtc/dtlsidentitystore.h"
-#include "talk/app/webrtc/java/jni/androidmediadecoder_jni.h"
-#include "talk/app/webrtc/java/jni/androidmediaencoder_jni.h"
-#include "talk/app/webrtc/java/jni/androidvideocapturer_jni.h"
-#include "talk/app/webrtc/java/jni/androidnetworkmonitor_jni.h"
-#include "talk/app/webrtc/java/jni/classreferenceholder.h"
-#include "talk/app/webrtc/java/jni/jni_helpers.h"
-#include "talk/app/webrtc/java/jni/native_handle_impl.h"
-#include "talk/app/webrtc/mediaconstraintsinterface.h"
-#include "talk/app/webrtc/peerconnectioninterface.h"
-#include "talk/app/webrtc/rtpreceiverinterface.h"
-#include "talk/app/webrtc/rtpsenderinterface.h"
-#include "talk/app/webrtc/videosourceinterface.h"
+#include "webrtc/api/androidvideocapturer.h"
+#include "webrtc/api/dtlsidentitystore.h"
+#include "webrtc/api/java/jni/androidmediadecoder_jni.h"
+#include "webrtc/api/java/jni/androidmediaencoder_jni.h"
+#include "webrtc/api/java/jni/androidnetworkmonitor_jni.h"
+#include "webrtc/api/java/jni/androidvideocapturer_jni.h"
+#include "webrtc/api/java/jni/classreferenceholder.h"
+#include "webrtc/api/java/jni/jni_helpers.h"
+#include "webrtc/api/java/jni/native_handle_impl.h"
+#include "webrtc/api/mediaconstraintsinterface.h"
+#include "webrtc/api/peerconnectioninterface.h"
+#include "webrtc/api/rtpreceiverinterface.h"
+#include "webrtc/api/rtpsenderinterface.h"
+#include "webrtc/api/videosourceinterface.h"
 #include "webrtc/base/bind.h"
 #include "webrtc/base/checks.h"
 #include "webrtc/base/event_tracer.h"
@@ -87,6 +87,7 @@
 #include "webrtc/media/devices/videorendererfactory.h"
 #include "webrtc/media/webrtc/webrtcvideodecoderfactory.h"
 #include "webrtc/media/webrtc/webrtcvideoencoderfactory.h"
+#include "webrtc/modules/video_render/video_render_internal.h"
 #include "webrtc/system_wrappers/include/field_trial_default.h"
 #include "webrtc/system_wrappers/include/logcat_trace_context.h"
 #include "webrtc/system_wrappers/include/trace.h"
diff --git a/talk/app/webrtc/java/jni/surfacetexturehelper_jni.cc b/webrtc/api/java/jni/surfacetexturehelper_jni.cc
similarity index 95%
rename from talk/app/webrtc/java/jni/surfacetexturehelper_jni.cc
rename to webrtc/api/java/jni/surfacetexturehelper_jni.cc
index 3e32b9a..335081d 100644
--- a/talk/app/webrtc/java/jni/surfacetexturehelper_jni.cc
+++ b/webrtc/api/java/jni/surfacetexturehelper_jni.cc
@@ -27,9 +27,9 @@
  */
 
 
-#include "talk/app/webrtc/java/jni/surfacetexturehelper_jni.h"
+#include "webrtc/api/java/jni/surfacetexturehelper_jni.h"
 
-#include "talk/app/webrtc/java/jni/classreferenceholder.h"
+#include "webrtc/api/java/jni/classreferenceholder.h"
 #include "webrtc/base/bind.h"
 #include "webrtc/base/checks.h"
 
diff --git a/talk/app/webrtc/java/jni/surfacetexturehelper_jni.h b/webrtc/api/java/jni/surfacetexturehelper_jni.h
similarity index 90%
rename from talk/app/webrtc/java/jni/surfacetexturehelper_jni.h
rename to webrtc/api/java/jni/surfacetexturehelper_jni.h
index 8dde2b5..8953b02 100644
--- a/talk/app/webrtc/java/jni/surfacetexturehelper_jni.h
+++ b/webrtc/api/java/jni/surfacetexturehelper_jni.h
@@ -26,13 +26,13 @@
  *
  */
 
-#ifndef TALK_APP_WEBRTC_JAVA_JNI_SURFACETEXTUREHELPER_JNI_H_
-#define TALK_APP_WEBRTC_JAVA_JNI_SURFACETEXTUREHELPER_JNI_H_
+#ifndef WEBRTC_API_JAVA_JNI_SURFACETEXTUREHELPER_JNI_H_
+#define WEBRTC_API_JAVA_JNI_SURFACETEXTUREHELPER_JNI_H_
 
 #include <jni.h>
 
-#include "talk/app/webrtc/java/jni/jni_helpers.h"
-#include "talk/app/webrtc/java/jni/native_handle_impl.h"
+#include "webrtc/api/java/jni/jni_helpers.h"
+#include "webrtc/api/java/jni/native_handle_impl.h"
 #include "webrtc/base/refcount.h"
 #include "webrtc/base/scoped_ref_ptr.h"
 #include "webrtc/common_video/include/video_frame_buffer.h"
@@ -76,4 +76,4 @@
 
 }  // namespace webrtc_jni
 
-#endif  // TALK_APP_WEBRTC_JAVA_JNI_SURFACETEXTUREHELPER_JNI_H_
+#endif  // WEBRTC_API_JAVA_JNI_SURFACETEXTUREHELPER_JNI_H_
diff --git a/talk/app/webrtc/java/src/org/webrtc/AudioSource.java b/webrtc/api/java/src/org/webrtc/AudioSource.java
similarity index 100%
rename from talk/app/webrtc/java/src/org/webrtc/AudioSource.java
rename to webrtc/api/java/src/org/webrtc/AudioSource.java
diff --git a/talk/app/webrtc/java/src/org/webrtc/AudioTrack.java b/webrtc/api/java/src/org/webrtc/AudioTrack.java
similarity index 100%
rename from talk/app/webrtc/java/src/org/webrtc/AudioTrack.java
rename to webrtc/api/java/src/org/webrtc/AudioTrack.java
diff --git a/talk/app/webrtc/java/src/org/webrtc/CallSessionFileRotatingLogSink.java b/webrtc/api/java/src/org/webrtc/CallSessionFileRotatingLogSink.java
similarity index 100%
rename from talk/app/webrtc/java/src/org/webrtc/CallSessionFileRotatingLogSink.java
rename to webrtc/api/java/src/org/webrtc/CallSessionFileRotatingLogSink.java
diff --git a/talk/app/webrtc/java/src/org/webrtc/DataChannel.java b/webrtc/api/java/src/org/webrtc/DataChannel.java
similarity index 100%
rename from talk/app/webrtc/java/src/org/webrtc/DataChannel.java
rename to webrtc/api/java/src/org/webrtc/DataChannel.java
diff --git a/talk/app/webrtc/java/src/org/webrtc/IceCandidate.java b/webrtc/api/java/src/org/webrtc/IceCandidate.java
similarity index 100%
rename from talk/app/webrtc/java/src/org/webrtc/IceCandidate.java
rename to webrtc/api/java/src/org/webrtc/IceCandidate.java
diff --git a/talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java b/webrtc/api/java/src/org/webrtc/MediaCodecVideoDecoder.java
similarity index 100%
rename from talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java
rename to webrtc/api/java/src/org/webrtc/MediaCodecVideoDecoder.java
diff --git a/talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoEncoder.java b/webrtc/api/java/src/org/webrtc/MediaCodecVideoEncoder.java
similarity index 100%
rename from talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoEncoder.java
rename to webrtc/api/java/src/org/webrtc/MediaCodecVideoEncoder.java
diff --git a/talk/app/webrtc/java/src/org/webrtc/MediaConstraints.java b/webrtc/api/java/src/org/webrtc/MediaConstraints.java
similarity index 100%
rename from talk/app/webrtc/java/src/org/webrtc/MediaConstraints.java
rename to webrtc/api/java/src/org/webrtc/MediaConstraints.java
diff --git a/talk/app/webrtc/java/src/org/webrtc/MediaSource.java b/webrtc/api/java/src/org/webrtc/MediaSource.java
similarity index 100%
rename from talk/app/webrtc/java/src/org/webrtc/MediaSource.java
rename to webrtc/api/java/src/org/webrtc/MediaSource.java
diff --git a/talk/app/webrtc/java/src/org/webrtc/MediaStream.java b/webrtc/api/java/src/org/webrtc/MediaStream.java
similarity index 100%
rename from talk/app/webrtc/java/src/org/webrtc/MediaStream.java
rename to webrtc/api/java/src/org/webrtc/MediaStream.java
diff --git a/talk/app/webrtc/java/src/org/webrtc/MediaStreamTrack.java b/webrtc/api/java/src/org/webrtc/MediaStreamTrack.java
similarity index 100%
rename from talk/app/webrtc/java/src/org/webrtc/MediaStreamTrack.java
rename to webrtc/api/java/src/org/webrtc/MediaStreamTrack.java
diff --git a/talk/app/webrtc/java/src/org/webrtc/PeerConnection.java b/webrtc/api/java/src/org/webrtc/PeerConnection.java
similarity index 100%
rename from talk/app/webrtc/java/src/org/webrtc/PeerConnection.java
rename to webrtc/api/java/src/org/webrtc/PeerConnection.java
diff --git a/talk/app/webrtc/java/src/org/webrtc/PeerConnectionFactory.java b/webrtc/api/java/src/org/webrtc/PeerConnectionFactory.java
similarity index 100%
rename from talk/app/webrtc/java/src/org/webrtc/PeerConnectionFactory.java
rename to webrtc/api/java/src/org/webrtc/PeerConnectionFactory.java
diff --git a/talk/app/webrtc/java/src/org/webrtc/RtpReceiver.java b/webrtc/api/java/src/org/webrtc/RtpReceiver.java
similarity index 100%
rename from talk/app/webrtc/java/src/org/webrtc/RtpReceiver.java
rename to webrtc/api/java/src/org/webrtc/RtpReceiver.java
diff --git a/talk/app/webrtc/java/src/org/webrtc/RtpSender.java b/webrtc/api/java/src/org/webrtc/RtpSender.java
similarity index 100%
rename from talk/app/webrtc/java/src/org/webrtc/RtpSender.java
rename to webrtc/api/java/src/org/webrtc/RtpSender.java
diff --git a/talk/app/webrtc/java/src/org/webrtc/SdpObserver.java b/webrtc/api/java/src/org/webrtc/SdpObserver.java
similarity index 100%
rename from talk/app/webrtc/java/src/org/webrtc/SdpObserver.java
rename to webrtc/api/java/src/org/webrtc/SdpObserver.java
diff --git a/talk/app/webrtc/java/src/org/webrtc/SessionDescription.java b/webrtc/api/java/src/org/webrtc/SessionDescription.java
similarity index 100%
rename from talk/app/webrtc/java/src/org/webrtc/SessionDescription.java
rename to webrtc/api/java/src/org/webrtc/SessionDescription.java
diff --git a/talk/app/webrtc/java/src/org/webrtc/StatsObserver.java b/webrtc/api/java/src/org/webrtc/StatsObserver.java
similarity index 100%
rename from talk/app/webrtc/java/src/org/webrtc/StatsObserver.java
rename to webrtc/api/java/src/org/webrtc/StatsObserver.java
diff --git a/talk/app/webrtc/java/src/org/webrtc/StatsReport.java b/webrtc/api/java/src/org/webrtc/StatsReport.java
similarity index 100%
rename from talk/app/webrtc/java/src/org/webrtc/StatsReport.java
rename to webrtc/api/java/src/org/webrtc/StatsReport.java
diff --git a/talk/app/webrtc/java/src/org/webrtc/VideoCapturer.java b/webrtc/api/java/src/org/webrtc/VideoCapturer.java
similarity index 100%
rename from talk/app/webrtc/java/src/org/webrtc/VideoCapturer.java
rename to webrtc/api/java/src/org/webrtc/VideoCapturer.java
diff --git a/talk/app/webrtc/java/src/org/webrtc/VideoRenderer.java b/webrtc/api/java/src/org/webrtc/VideoRenderer.java
similarity index 100%
rename from talk/app/webrtc/java/src/org/webrtc/VideoRenderer.java
rename to webrtc/api/java/src/org/webrtc/VideoRenderer.java
diff --git a/talk/app/webrtc/java/src/org/webrtc/VideoSource.java b/webrtc/api/java/src/org/webrtc/VideoSource.java
similarity index 100%
rename from talk/app/webrtc/java/src/org/webrtc/VideoSource.java
rename to webrtc/api/java/src/org/webrtc/VideoSource.java
diff --git a/talk/app/webrtc/java/src/org/webrtc/VideoTrack.java b/webrtc/api/java/src/org/webrtc/VideoTrack.java
similarity index 100%
rename from talk/app/webrtc/java/src/org/webrtc/VideoTrack.java
rename to webrtc/api/java/src/org/webrtc/VideoTrack.java
diff --git a/talk/app/webrtc/jsep.h b/webrtc/api/jsep.h
similarity index 97%
rename from talk/app/webrtc/jsep.h
rename to webrtc/api/jsep.h
index c12ab85..c49a16b 100644
--- a/talk/app/webrtc/jsep.h
+++ b/webrtc/api/jsep.h
@@ -27,8 +27,8 @@
 
 // Interfaces matching the draft-ietf-rtcweb-jsep-01.
 
-#ifndef TALK_APP_WEBRTC_JSEP_H_
-#define TALK_APP_WEBRTC_JSEP_H_
+#ifndef WEBRTC_API_JSEP_H_
+#define WEBRTC_API_JSEP_H_
 
 #include <string>
 #include <vector>
@@ -152,4 +152,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_JSEP_H_
+#endif  // WEBRTC_API_JSEP_H_
diff --git a/talk/app/webrtc/jsepicecandidate.cc b/webrtc/api/jsepicecandidate.cc
similarity index 97%
rename from talk/app/webrtc/jsepicecandidate.cc
rename to webrtc/api/jsepicecandidate.cc
index 768bd0a..172c52e 100644
--- a/talk/app/webrtc/jsepicecandidate.cc
+++ b/webrtc/api/jsepicecandidate.cc
@@ -25,11 +25,11 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/jsepicecandidate.h"
+#include "webrtc/api/jsepicecandidate.h"
 
 #include <vector>
 
-#include "talk/app/webrtc/webrtcsdp.h"
+#include "webrtc/api/webrtcsdp.h"
 #include "webrtc/base/stringencode.h"
 
 namespace webrtc {
diff --git a/talk/app/webrtc/jsepicecandidate.h b/webrtc/api/jsepicecandidate.h
similarity index 94%
rename from talk/app/webrtc/jsepicecandidate.h
rename to webrtc/api/jsepicecandidate.h
index 539376e..957d7c0 100644
--- a/talk/app/webrtc/jsepicecandidate.h
+++ b/webrtc/api/jsepicecandidate.h
@@ -27,12 +27,12 @@
 
 // Implements the IceCandidateInterface.
 
-#ifndef TALK_APP_WEBRTC_JSEPICECANDIDATE_H_
-#define TALK_APP_WEBRTC_JSEPICECANDIDATE_H_
+#ifndef WEBRTC_API_JSEPICECANDIDATE_H_
+#define WEBRTC_API_JSEPICECANDIDATE_H_
 
 #include <string>
 
-#include "talk/app/webrtc/jsep.h"
+#include "webrtc/api/jsep.h"
 #include "webrtc/base/constructormagic.h"
 #include "webrtc/p2p/base/candidate.h"
 
@@ -89,4 +89,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_JSEPICECANDIDATE_H_
+#endif  // WEBRTC_API_JSEPICECANDIDATE_H_
diff --git a/talk/app/webrtc/jsepsessiondescription.cc b/webrtc/api/jsepsessiondescription.cc
similarity index 98%
rename from talk/app/webrtc/jsepsessiondescription.cc
rename to webrtc/api/jsepsessiondescription.cc
index 226432d..2ffc2de 100644
--- a/talk/app/webrtc/jsepsessiondescription.cc
+++ b/webrtc/api/jsepsessiondescription.cc
@@ -25,9 +25,9 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/jsepsessiondescription.h"
+#include "webrtc/api/jsepsessiondescription.h"
 
-#include "talk/app/webrtc/webrtcsdp.h"
+#include "webrtc/api/webrtcsdp.h"
 #include "talk/session/media/mediasession.h"
 #include "webrtc/base/arraysize.h"
 #include "webrtc/base/stringencode.h"
diff --git a/talk/app/webrtc/jsepsessiondescription.h b/webrtc/api/jsepsessiondescription.h
similarity index 93%
rename from talk/app/webrtc/jsepsessiondescription.h
rename to webrtc/api/jsepsessiondescription.h
index 756352c..b6e6348 100644
--- a/talk/app/webrtc/jsepsessiondescription.h
+++ b/webrtc/api/jsepsessiondescription.h
@@ -27,14 +27,14 @@
 
 // Implements the SessionDescriptionInterface.
 
-#ifndef TALK_APP_WEBRTC_JSEPSESSIONDESCRIPTION_H_
-#define TALK_APP_WEBRTC_JSEPSESSIONDESCRIPTION_H_
+#ifndef WEBRTC_API_JSEPSESSIONDESCRIPTION_H_
+#define WEBRTC_API_JSEPSESSIONDESCRIPTION_H_
 
 #include <string>
 #include <vector>
 
-#include "talk/app/webrtc/jsep.h"
-#include "talk/app/webrtc/jsepicecandidate.h"
+#include "webrtc/api/jsep.h"
+#include "webrtc/api/jsepicecandidate.h"
 #include "webrtc/base/scoped_ptr.h"
 
 namespace cricket {
@@ -103,4 +103,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_JSEPSESSIONDESCRIPTION_H_
+#endif  // WEBRTC_API_JSEPSESSIONDESCRIPTION_H_
diff --git a/talk/app/webrtc/jsepsessiondescription_unittest.cc b/webrtc/api/jsepsessiondescription_unittest.cc
similarity index 98%
rename from talk/app/webrtc/jsepsessiondescription_unittest.cc
rename to webrtc/api/jsepsessiondescription_unittest.cc
index dc0773a..90de058 100644
--- a/talk/app/webrtc/jsepsessiondescription_unittest.cc
+++ b/webrtc/api/jsepsessiondescription_unittest.cc
@@ -27,8 +27,8 @@
 
 #include <string>
 
-#include "talk/app/webrtc/jsepicecandidate.h"
-#include "talk/app/webrtc/jsepsessiondescription.h"
+#include "webrtc/api/jsepicecandidate.h"
+#include "webrtc/api/jsepsessiondescription.h"
 #include "talk/session/media/mediasession.h"
 #include "webrtc/base/gunit.h"
 #include "webrtc/base/helpers.h"
diff --git a/talk/app/webrtc/localaudiosource.cc b/webrtc/api/localaudiosource.cc
similarity index 97%
rename from talk/app/webrtc/localaudiosource.cc
rename to webrtc/api/localaudiosource.cc
index 9789fe6..7aa05bb 100644
--- a/talk/app/webrtc/localaudiosource.cc
+++ b/webrtc/api/localaudiosource.cc
@@ -25,11 +25,11 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/localaudiosource.h"
+#include "webrtc/api/localaudiosource.h"
 
 #include <vector>
 
-#include "talk/app/webrtc/mediaconstraintsinterface.h"
+#include "webrtc/api/mediaconstraintsinterface.h"
 #include "webrtc/media/base/mediaengine.h"
 
 using webrtc::MediaConstraintsInterface;
diff --git a/talk/app/webrtc/localaudiosource.h b/webrtc/api/localaudiosource.h
similarity index 90%
rename from talk/app/webrtc/localaudiosource.h
rename to webrtc/api/localaudiosource.h
index 67750aa..5b6133a 100644
--- a/talk/app/webrtc/localaudiosource.h
+++ b/webrtc/api/localaudiosource.h
@@ -25,12 +25,12 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_LOCALAUDIOSOURCE_H_
-#define TALK_APP_WEBRTC_LOCALAUDIOSOURCE_H_
+#ifndef WEBRTC_API_LOCALAUDIOSOURCE_H_
+#define WEBRTC_API_LOCALAUDIOSOURCE_H_
 
-#include "talk/app/webrtc/mediastreaminterface.h"
-#include "talk/app/webrtc/notifier.h"
-#include "talk/app/webrtc/peerconnectioninterface.h"
+#include "webrtc/api/mediastreaminterface.h"
+#include "webrtc/api/notifier.h"
+#include "webrtc/api/peerconnectioninterface.h"
 #include "webrtc/base/scoped_ptr.h"
 #include "webrtc/media/base/mediachannel.h"
 
@@ -70,4 +70,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_LOCALAUDIOSOURCE_H_
+#endif  // WEBRTC_API_LOCALAUDIOSOURCE_H_
diff --git a/talk/app/webrtc/localaudiosource_unittest.cc b/webrtc/api/localaudiosource_unittest.cc
similarity index 97%
rename from talk/app/webrtc/localaudiosource_unittest.cc
rename to webrtc/api/localaudiosource_unittest.cc
index 5ff1a7a..01469e2 100644
--- a/talk/app/webrtc/localaudiosource_unittest.cc
+++ b/webrtc/api/localaudiosource_unittest.cc
@@ -25,12 +25,12 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/localaudiosource.h"
+#include "webrtc/api/localaudiosource.h"
 
 #include <string>
 #include <vector>
 
-#include "talk/app/webrtc/test/fakeconstraints.h"
+#include "webrtc/api/test/fakeconstraints.h"
 #include "webrtc/base/gunit.h"
 #include "webrtc/media/base/fakemediaengine.h"
 #include "webrtc/media/base/fakevideorenderer.h"
diff --git a/talk/app/webrtc/mediaconstraintsinterface.cc b/webrtc/api/mediaconstraintsinterface.cc
similarity index 98%
rename from talk/app/webrtc/mediaconstraintsinterface.cc
rename to webrtc/api/mediaconstraintsinterface.cc
index 40db5dc..b8575ae 100644
--- a/talk/app/webrtc/mediaconstraintsinterface.cc
+++ b/webrtc/api/mediaconstraintsinterface.cc
@@ -25,7 +25,7 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/mediaconstraintsinterface.h"
+#include "webrtc/api/mediaconstraintsinterface.h"
 
 #include "webrtc/base/stringencode.h"
 
diff --git a/talk/app/webrtc/mediaconstraintsinterface.h b/webrtc/api/mediaconstraintsinterface.h
similarity index 96%
rename from talk/app/webrtc/mediaconstraintsinterface.h
rename to webrtc/api/mediaconstraintsinterface.h
index e06c075..d759e00 100644
--- a/talk/app/webrtc/mediaconstraintsinterface.h
+++ b/webrtc/api/mediaconstraintsinterface.h
@@ -30,8 +30,8 @@
 // http://www.w3.org/TR/mediacapture-streams/#mediastreamconstraints and also
 // used in WebRTC: http://dev.w3.org/2011/webrtc/editor/webrtc.html#constraints.
 
-#ifndef TALK_APP_WEBRTC_MEDIACONSTRAINTSINTERFACE_H_
-#define TALK_APP_WEBRTC_MEDIACONSTRAINTSINTERFACE_H_
+#ifndef WEBRTC_API_MEDIACONSTRAINTSINTERFACE_H_
+#define WEBRTC_API_MEDIACONSTRAINTSINTERFACE_H_
 
 #include <string>
 #include <vector>
@@ -138,4 +138,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_MEDIACONSTRAINTSINTERFACE_H_
+#endif  // WEBRTC_API_MEDIACONSTRAINTSINTERFACE_H_
diff --git a/talk/app/webrtc/mediacontroller.cc b/webrtc/api/mediacontroller.cc
similarity index 98%
rename from talk/app/webrtc/mediacontroller.cc
rename to webrtc/api/mediacontroller.cc
index 24f5877..7d94a1a 100644
--- a/talk/app/webrtc/mediacontroller.cc
+++ b/webrtc/api/mediacontroller.cc
@@ -25,7 +25,7 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/mediacontroller.h"
+#include "webrtc/api/mediacontroller.h"
 
 #include "talk/session/media/channelmanager.h"
 #include "webrtc/base/bind.h"
diff --git a/talk/app/webrtc/mediacontroller.h b/webrtc/api/mediacontroller.h
similarity index 93%
rename from talk/app/webrtc/mediacontroller.h
rename to webrtc/api/mediacontroller.h
index 1b51be7..f07ddf5 100644
--- a/talk/app/webrtc/mediacontroller.h
+++ b/webrtc/api/mediacontroller.h
@@ -25,8 +25,8 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_MEDIACONTROLLER_H_
-#define TALK_APP_WEBRTC_MEDIACONTROLLER_H_
+#ifndef WEBRTC_API_MEDIACONTROLLER_H_
+#define WEBRTC_API_MEDIACONTROLLER_H_
 
 #include "webrtc/base/thread.h"
 
@@ -52,4 +52,4 @@
 };
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_MEDIACONTROLLER_H_
+#endif  // WEBRTC_API_MEDIACONTROLLER_H_
diff --git a/talk/app/webrtc/mediastream.cc b/webrtc/api/mediastream.cc
similarity index 98%
rename from talk/app/webrtc/mediastream.cc
rename to webrtc/api/mediastream.cc
index 0d20630..fe7db9f 100644
--- a/talk/app/webrtc/mediastream.cc
+++ b/webrtc/api/mediastream.cc
@@ -25,7 +25,7 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/mediastream.h"
+#include "webrtc/api/mediastream.h"
 #include "webrtc/base/logging.h"
 
 namespace webrtc {
diff --git a/talk/app/webrtc/mediastream.h b/webrtc/api/mediastream.h
similarity index 92%
rename from talk/app/webrtc/mediastream.h
rename to webrtc/api/mediastream.h
index 240512d..94f21eb 100644
--- a/talk/app/webrtc/mediastream.h
+++ b/webrtc/api/mediastream.h
@@ -27,14 +27,14 @@
 
 // This file contains the implementation of MediaStreamInterface interface.
 
-#ifndef TALK_APP_WEBRTC_MEDIASTREAM_H_
-#define TALK_APP_WEBRTC_MEDIASTREAM_H_
+#ifndef WEBRTC_API_MEDIASTREAM_H_
+#define WEBRTC_API_MEDIASTREAM_H_
 
 #include <string>
 #include <vector>
 
-#include "talk/app/webrtc/mediastreaminterface.h"
-#include "talk/app/webrtc/notifier.h"
+#include "webrtc/api/mediastreaminterface.h"
+#include "webrtc/api/notifier.h"
 
 namespace webrtc {
 
@@ -72,4 +72,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_MEDIASTREAM_H_
+#endif  // WEBRTC_API_MEDIASTREAM_H_
diff --git a/talk/app/webrtc/mediastream_unittest.cc b/webrtc/api/mediastream_unittest.cc
similarity index 97%
rename from talk/app/webrtc/mediastream_unittest.cc
rename to webrtc/api/mediastream_unittest.cc
index f19b945..5d6d15d 100644
--- a/talk/app/webrtc/mediastream_unittest.cc
+++ b/webrtc/api/mediastream_unittest.cc
@@ -27,9 +27,9 @@
 
 #include <string>
 
-#include "talk/app/webrtc/audiotrack.h"
-#include "talk/app/webrtc/mediastream.h"
-#include "talk/app/webrtc/videotrack.h"
+#include "webrtc/api/audiotrack.h"
+#include "webrtc/api/mediastream.h"
+#include "webrtc/api/videotrack.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "webrtc/base/gunit.h"
diff --git a/talk/app/webrtc/mediastreamhandler.cc b/webrtc/api/mediastreamhandler.cc
similarity index 100%
rename from talk/app/webrtc/mediastreamhandler.cc
rename to webrtc/api/mediastreamhandler.cc
diff --git a/talk/app/webrtc/mediastreamhandler.h b/webrtc/api/mediastreamhandler.h
similarity index 100%
rename from talk/app/webrtc/mediastreamhandler.h
rename to webrtc/api/mediastreamhandler.h
diff --git a/talk/app/webrtc/mediastreaminterface.h b/webrtc/api/mediastreaminterface.h
similarity index 98%
rename from talk/app/webrtc/mediastreaminterface.h
rename to webrtc/api/mediastreaminterface.h
index 2d2dc9a..28f243a 100644
--- a/talk/app/webrtc/mediastreaminterface.h
+++ b/webrtc/api/mediastreaminterface.h
@@ -31,8 +31,8 @@
 // interfaces must be used only with PeerConnection. PeerConnectionManager
 // interface provides the factory methods to create MediaStream and MediaTracks.
 
-#ifndef TALK_APP_WEBRTC_MEDIASTREAMINTERFACE_H_
-#define TALK_APP_WEBRTC_MEDIASTREAMINTERFACE_H_
+#ifndef WEBRTC_API_MEDIASTREAMINTERFACE_H_
+#define WEBRTC_API_MEDIASTREAMINTERFACE_H_
 
 #include <string>
 #include <vector>
@@ -293,4 +293,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_MEDIASTREAMINTERFACE_H_
+#endif  // WEBRTC_API_MEDIASTREAMINTERFACE_H_
diff --git a/talk/app/webrtc/mediastreamobserver.cc b/webrtc/api/mediastreamobserver.cc
similarity index 98%
rename from talk/app/webrtc/mediastreamobserver.cc
rename to webrtc/api/mediastreamobserver.cc
index 2650b9a..3f47f13 100644
--- a/talk/app/webrtc/mediastreamobserver.cc
+++ b/webrtc/api/mediastreamobserver.cc
@@ -25,7 +25,7 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/mediastreamobserver.h"
+#include "webrtc/api/mediastreamobserver.h"
 
 #include <algorithm>
 
diff --git a/talk/app/webrtc/mediastreamobserver.h b/webrtc/api/mediastreamobserver.h
similarity index 92%
rename from talk/app/webrtc/mediastreamobserver.h
rename to webrtc/api/mediastreamobserver.h
index 1dd6c4c..1546942 100644
--- a/talk/app/webrtc/mediastreamobserver.h
+++ b/webrtc/api/mediastreamobserver.h
@@ -25,10 +25,10 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_MEDIASTREAMOBSERVER_H_
-#define TALK_APP_WEBRTC_MEDIASTREAMOBSERVER_H_
+#ifndef WEBRTC_API_MEDIASTREAMOBSERVER_H_
+#define WEBRTC_API_MEDIASTREAMOBSERVER_H_
 
-#include "talk/app/webrtc/mediastreaminterface.h"
+#include "webrtc/api/mediastreaminterface.h"
 #include "webrtc/base/scoped_ref_ptr.h"
 #include "webrtc/base/sigslot.h"
 
@@ -62,4 +62,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_MEDIASTREAMOBSERVER_H_
+#endif  // WEBRTC_API_MEDIASTREAMOBSERVER_H_
diff --git a/talk/app/webrtc/mediastreamprovider.h b/webrtc/api/mediastreamprovider.h
similarity index 96%
rename from talk/app/webrtc/mediastreamprovider.h
rename to webrtc/api/mediastreamprovider.h
index 103b3f3..4ee27aa 100644
--- a/talk/app/webrtc/mediastreamprovider.h
+++ b/webrtc/api/mediastreamprovider.h
@@ -25,8 +25,8 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_MEDIASTREAMPROVIDER_H_
-#define TALK_APP_WEBRTC_MEDIASTREAMPROVIDER_H_
+#ifndef WEBRTC_API_MEDIASTREAMPROVIDER_H_
+#define WEBRTC_API_MEDIASTREAMPROVIDER_H_
 
 #include "webrtc/base/basictypes.h"
 #include "webrtc/base/scoped_ptr.h"
@@ -105,4 +105,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_MEDIASTREAMPROVIDER_H_
+#endif  // WEBRTC_API_MEDIASTREAMPROVIDER_H_
diff --git a/talk/app/webrtc/mediastreamproxy.h b/webrtc/api/mediastreamproxy.h
similarity index 90%
rename from talk/app/webrtc/mediastreamproxy.h
rename to webrtc/api/mediastreamproxy.h
index bde7dcf..635f458 100644
--- a/talk/app/webrtc/mediastreamproxy.h
+++ b/webrtc/api/mediastreamproxy.h
@@ -25,11 +25,11 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_MEDIASTREAMPROXY_H_
-#define TALK_APP_WEBRTC_MEDIASTREAMPROXY_H_
+#ifndef WEBRTC_API_MEDIASTREAMPROXY_H_
+#define WEBRTC_API_MEDIASTREAMPROXY_H_
 
-#include "talk/app/webrtc/mediastreaminterface.h"
-#include "talk/app/webrtc/proxy.h"
+#include "webrtc/api/mediastreaminterface.h"
+#include "webrtc/api/proxy.h"
 
 namespace webrtc {
 
@@ -51,4 +51,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_MEDIASTREAMPROXY_H_
+#endif  // WEBRTC_API_MEDIASTREAMPROXY_H_
diff --git a/talk/app/webrtc/mediastreamtrack.h b/webrtc/api/mediastreamtrack.h
similarity index 91%
rename from talk/app/webrtc/mediastreamtrack.h
rename to webrtc/api/mediastreamtrack.h
index 2097d90..2e9f774 100644
--- a/talk/app/webrtc/mediastreamtrack.h
+++ b/webrtc/api/mediastreamtrack.h
@@ -25,13 +25,13 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_MEDIASTREAMTRACK_H_
-#define TALK_APP_WEBRTC_MEDIASTREAMTRACK_H_
+#ifndef WEBRTC_API_MEDIASTREAMTRACK_H_
+#define WEBRTC_API_MEDIASTREAMTRACK_H_
 
 #include <string>
 
-#include "talk/app/webrtc/mediastreaminterface.h"
-#include "talk/app/webrtc/notifier.h"
+#include "webrtc/api/mediastreaminterface.h"
+#include "webrtc/api/notifier.h"
 
 namespace webrtc {
 
@@ -78,4 +78,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_MEDIASTREAMTRACK_H_
+#endif  // WEBRTC_API_MEDIASTREAMTRACK_H_
diff --git a/talk/app/webrtc/mediastreamtrackproxy.h b/webrtc/api/mediastreamtrackproxy.h
similarity index 92%
rename from talk/app/webrtc/mediastreamtrackproxy.h
rename to webrtc/api/mediastreamtrackproxy.h
index e99910e..eabb0cf 100644
--- a/talk/app/webrtc/mediastreamtrackproxy.h
+++ b/webrtc/api/mediastreamtrackproxy.h
@@ -28,11 +28,11 @@
 // This file includes proxy classes for tracks. The purpose is
 // to make sure tracks are only accessed from the signaling thread.
 
-#ifndef TALK_APP_WEBRTC_MEDIASTREAMTRACKPROXY_H_
-#define TALK_APP_WEBRTC_MEDIASTREAMTRACKPROXY_H_
+#ifndef WEBRTC_API_MEDIASTREAMTRACKPROXY_H_
+#define WEBRTC_API_MEDIASTREAMTRACKPROXY_H_
 
-#include "talk/app/webrtc/mediastreaminterface.h"
-#include "talk/app/webrtc/proxy.h"
+#include "webrtc/api/mediastreaminterface.h"
+#include "webrtc/api/proxy.h"
 
 namespace webrtc {
 
@@ -74,4 +74,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_MEDIASTREAMTRACKPROXY_H_
+#endif  // WEBRTC_API_MEDIASTREAMTRACKPROXY_H_
diff --git a/talk/app/webrtc/notifier.h b/webrtc/api/notifier.h
similarity index 93%
rename from talk/app/webrtc/notifier.h
rename to webrtc/api/notifier.h
index ecc16b9..a6dbba7 100644
--- a/talk/app/webrtc/notifier.h
+++ b/webrtc/api/notifier.h
@@ -25,12 +25,12 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_NOTIFIER_H_
-#define TALK_APP_WEBRTC_NOTIFIER_H_
+#ifndef WEBRTC_API_NOTIFIER_H_
+#define WEBRTC_API_NOTIFIER_H_
 
 #include <list>
 
-#include "talk/app/webrtc/mediastreaminterface.h"
+#include "webrtc/api/mediastreaminterface.h"
 #include "webrtc/base/common.h"
 
 namespace webrtc {
@@ -74,4 +74,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_NOTIFIER_H_
+#endif  // WEBRTC_API_NOTIFIER_H_
diff --git a/webrtc/api/objc/RTCAudioTrack+Private.h b/webrtc/api/objc/RTCAudioTrack+Private.h
index 36f72c7..ce3298e 100644
--- a/webrtc/api/objc/RTCAudioTrack+Private.h
+++ b/webrtc/api/objc/RTCAudioTrack+Private.h
@@ -10,7 +10,7 @@
 
 #import "RTCAudioTrack.h"
 
-#include "talk/app/webrtc/mediastreaminterface.h"
+#include "webrtc/api/mediastreaminterface.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
diff --git a/webrtc/api/objc/RTCConfiguration+Private.h b/webrtc/api/objc/RTCConfiguration+Private.h
index e14f92b..001dac6 100644
--- a/webrtc/api/objc/RTCConfiguration+Private.h
+++ b/webrtc/api/objc/RTCConfiguration+Private.h
@@ -10,7 +10,7 @@
 
 #import "RTCConfiguration.h"
 
-#include "talk/app/webrtc/peerconnectioninterface.h"
+#include "webrtc/api/peerconnectioninterface.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
diff --git a/webrtc/api/objc/RTCDataChannel+Private.h b/webrtc/api/objc/RTCDataChannel+Private.h
index cc44923..179192c 100644
--- a/webrtc/api/objc/RTCDataChannel+Private.h
+++ b/webrtc/api/objc/RTCDataChannel+Private.h
@@ -10,7 +10,7 @@
 
 #import "RTCDataChannel.h"
 
-#include "talk/app/webrtc/datachannelinterface.h"
+#include "webrtc/api/datachannelinterface.h"
 #include "webrtc/base/scoped_ref_ptr.h"
 
 NS_ASSUME_NONNULL_BEGIN
diff --git a/webrtc/api/objc/RTCDataChannelConfiguration+Private.h b/webrtc/api/objc/RTCDataChannelConfiguration+Private.h
index e99ba7c..13478e7 100644
--- a/webrtc/api/objc/RTCDataChannelConfiguration+Private.h
+++ b/webrtc/api/objc/RTCDataChannelConfiguration+Private.h
@@ -10,7 +10,7 @@
 
 #import "RTCDataChannelConfiguration.h"
 
-#include "talk/app/webrtc/datachannelinterface.h"
+#include "webrtc/api/datachannelinterface.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
diff --git a/webrtc/api/objc/RTCIceCandidate+Private.h b/webrtc/api/objc/RTCIceCandidate+Private.h
index ca95a43..b65f113 100644
--- a/webrtc/api/objc/RTCIceCandidate+Private.h
+++ b/webrtc/api/objc/RTCIceCandidate+Private.h
@@ -10,7 +10,7 @@
 
 #import "RTCIceCandidate.h"
 
-#include "talk/app/webrtc/jsep.h"
+#include "webrtc/api/jsep.h"
 #include "webrtc/base/scoped_ptr.h"
 
 NS_ASSUME_NONNULL_BEGIN
diff --git a/webrtc/api/objc/RTCIceServer+Private.h b/webrtc/api/objc/RTCIceServer+Private.h
index 3890567..556936d 100644
--- a/webrtc/api/objc/RTCIceServer+Private.h
+++ b/webrtc/api/objc/RTCIceServer+Private.h
@@ -10,7 +10,7 @@
 
 #import "RTCIceServer.h"
 
-#include "talk/app/webrtc/peerconnectioninterface.h"
+#include "webrtc/api/peerconnectioninterface.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
diff --git a/webrtc/api/objc/RTCMediaConstraints+Private.h b/webrtc/api/objc/RTCMediaConstraints+Private.h
index 2c4b722..fa582ec 100644
--- a/webrtc/api/objc/RTCMediaConstraints+Private.h
+++ b/webrtc/api/objc/RTCMediaConstraints+Private.h
@@ -10,7 +10,7 @@
 
 #import "RTCMediaConstraints.h"
 
-#include "talk/app/webrtc/mediaconstraintsinterface.h"
+#include "webrtc/api/mediaconstraintsinterface.h"
 #include "webrtc/base/scoped_ptr.h"
 
 namespace webrtc {
diff --git a/webrtc/api/objc/RTCMediaStream+Private.h b/webrtc/api/objc/RTCMediaStream+Private.h
index 2c2662b..4c83288 100644
--- a/webrtc/api/objc/RTCMediaStream+Private.h
+++ b/webrtc/api/objc/RTCMediaStream+Private.h
@@ -10,7 +10,7 @@
 
 #import "RTCMediaStream.h"
 
-#include "talk/app/webrtc/mediastreaminterface.h"
+#include "webrtc/api/mediastreaminterface.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
diff --git a/webrtc/api/objc/RTCMediaStreamTrack+Private.h b/webrtc/api/objc/RTCMediaStreamTrack+Private.h
index fcdcdad..155e312 100644
--- a/webrtc/api/objc/RTCMediaStreamTrack+Private.h
+++ b/webrtc/api/objc/RTCMediaStreamTrack+Private.h
@@ -10,7 +10,7 @@
 
 #import "RTCMediaStreamTrack.h"
 
-#include "talk/app/webrtc/mediastreaminterface.h"
+#include "webrtc/api/mediastreaminterface.h"
 #include "webrtc/base/scoped_ptr.h"
 
 typedef NS_ENUM(NSInteger, RTCMediaStreamTrackType) {
diff --git a/webrtc/api/objc/RTCPeerConnectionFactory+Private.h b/webrtc/api/objc/RTCPeerConnectionFactory+Private.h
index a5f2350..55a473b 100644
--- a/webrtc/api/objc/RTCPeerConnectionFactory+Private.h
+++ b/webrtc/api/objc/RTCPeerConnectionFactory+Private.h
@@ -10,7 +10,7 @@
 
 #import "RTCPeerConnectionFactory.h"
 
-#include "talk/app/webrtc/peerconnectionfactory.h"
+#include "webrtc/api/peerconnectionfactory.h"
 #include "webrtc/base/scoped_ref_ptr.h"
 
 NS_ASSUME_NONNULL_BEGIN
diff --git a/webrtc/api/objc/RTCSessionDescription+Private.h b/webrtc/api/objc/RTCSessionDescription+Private.h
index aa0314d..b5c0fff 100644
--- a/webrtc/api/objc/RTCSessionDescription+Private.h
+++ b/webrtc/api/objc/RTCSessionDescription+Private.h
@@ -10,7 +10,7 @@
 
 #import "RTCSessionDescription.h"
 
-#include "talk/app/webrtc/jsep.h"
+#include "webrtc/api/jsep.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
diff --git a/webrtc/api/objc/RTCStatsReport+Private.h b/webrtc/api/objc/RTCStatsReport+Private.h
index 5b7dc32..5ce5801 100644
--- a/webrtc/api/objc/RTCStatsReport+Private.h
+++ b/webrtc/api/objc/RTCStatsReport+Private.h
@@ -10,7 +10,7 @@
 
 #import "RTCStatsReport.h"
 
-#include "talk/app/webrtc/statstypes.h"
+#include "webrtc/api/statstypes.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
diff --git a/webrtc/api/objc/RTCVideoRendererAdapter+Private.h b/webrtc/api/objc/RTCVideoRendererAdapter+Private.h
index 807eea4..c181b9b 100644
--- a/webrtc/api/objc/RTCVideoRendererAdapter+Private.h
+++ b/webrtc/api/objc/RTCVideoRendererAdapter+Private.h
@@ -10,7 +10,7 @@
 
 #import "RTCVideoRendererAdapter.h"
 
-#include "talk/app/webrtc/mediastreaminterface.h"
+#include "webrtc/api/mediastreaminterface.h"
 
 #import "RTCVideoRenderer.h"
 
diff --git a/webrtc/api/objc/RTCVideoSource+Private.h b/webrtc/api/objc/RTCVideoSource+Private.h
index 2300848..c363d33 100644
--- a/webrtc/api/objc/RTCVideoSource+Private.h
+++ b/webrtc/api/objc/RTCVideoSource+Private.h
@@ -10,7 +10,7 @@
 
 #import "RTCVideoSource.h"
 
-#include "talk/app/webrtc/videosourceinterface.h"
+#include "webrtc/api/videosourceinterface.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
diff --git a/webrtc/api/objc/RTCVideoTrack+Private.h b/webrtc/api/objc/RTCVideoTrack+Private.h
index 4f55481..cd7de48 100644
--- a/webrtc/api/objc/RTCVideoTrack+Private.h
+++ b/webrtc/api/objc/RTCVideoTrack+Private.h
@@ -10,7 +10,7 @@
 
 #import "RTCVideoTrack.h"
 
-#include "talk/app/webrtc/mediastreaminterface.h"
+#include "webrtc/api/mediastreaminterface.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
diff --git a/webrtc/api/objctests/RTCIceCandidateTest.mm b/webrtc/api/objctests/RTCIceCandidateTest.mm
index 391db44..2163ce2 100644
--- a/webrtc/api/objctests/RTCIceCandidateTest.mm
+++ b/webrtc/api/objctests/RTCIceCandidateTest.mm
@@ -1,11 +1,28 @@
 /*
- *  Copyright 2015 The WebRTC project authors. All Rights Reserved.
+ * libjingle
+ * Copyright 2015 Google Inc.
  *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree. An additional intellectual property rights grant can be found
- *  in the file PATENTS.  All contributing project authors may
- *  be found in the AUTHORS file in the root of the source tree.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  1. Redistributions of source code must retain the above copyright notice,
+ *     this list of conditions and the following disclaimer.
+ *  2. Redistributions in binary form must reproduce the above copyright notice,
+ *     this list of conditions and the following disclaimer in the documentation
+ *     and/or other materials provided with the distribution.
+ *  3. The name of the author may not be used to endorse or promote products
+ *     derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
 #import <Foundation/Foundation.h>
diff --git a/webrtc/api/objctests/RTCIceServerTest.mm b/webrtc/api/objctests/RTCIceServerTest.mm
index 2e6fb25..1ddb13c 100644
--- a/webrtc/api/objctests/RTCIceServerTest.mm
+++ b/webrtc/api/objctests/RTCIceServerTest.mm
@@ -1,11 +1,28 @@
 /*
- *  Copyright 2015 The WebRTC project authors. All Rights Reserved.
+ * libjingle
+ * Copyright 2015 Google Inc.
  *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree. An additional intellectual property rights grant can be found
- *  in the file PATENTS.  All contributing project authors may
- *  be found in the AUTHORS file in the root of the source tree.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  1. Redistributions of source code must retain the above copyright notice,
+ *     this list of conditions and the following disclaimer.
+ *  2. Redistributions in binary form must reproduce the above copyright notice,
+ *     this list of conditions and the following disclaimer in the documentation
+ *     and/or other materials provided with the distribution.
+ *  3. The name of the author may not be used to endorse or promote products
+ *     derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
 #import <Foundation/Foundation.h>
diff --git a/webrtc/api/objctests/RTCMediaConstraintsTest.mm b/webrtc/api/objctests/RTCMediaConstraintsTest.mm
index 44ffe3d..c1e1886 100644
--- a/webrtc/api/objctests/RTCMediaConstraintsTest.mm
+++ b/webrtc/api/objctests/RTCMediaConstraintsTest.mm
@@ -1,11 +1,28 @@
 /*
- *  Copyright 2015 The WebRTC project authors. All Rights Reserved.
+ * libjingle
+ * Copyright 2015 Google Inc.
  *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree. An additional intellectual property rights grant can be found
- *  in the file PATENTS.  All contributing project authors may
- *  be found in the AUTHORS file in the root of the source tree.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  1. Redistributions of source code must retain the above copyright notice,
+ *     this list of conditions and the following disclaimer.
+ *  2. Redistributions in binary form must reproduce the above copyright notice,
+ *     this list of conditions and the following disclaimer in the documentation
+ *     and/or other materials provided with the distribution.
+ *  3. The name of the author may not be used to endorse or promote products
+ *     derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
 #import <Foundation/Foundation.h>
diff --git a/webrtc/api/objctests/RTCSessionDescriptionTest.mm b/webrtc/api/objctests/RTCSessionDescriptionTest.mm
index 2404dedd..6eaa36f 100644
--- a/webrtc/api/objctests/RTCSessionDescriptionTest.mm
+++ b/webrtc/api/objctests/RTCSessionDescriptionTest.mm
@@ -1,11 +1,28 @@
 /*
- *  Copyright 2015 The WebRTC project authors. All Rights Reserved.
+ * libjingle
+ * Copyright 2015 Google Inc.
  *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree. An additional intellectual property rights grant can be found
- *  in the file PATENTS.  All contributing project authors may
- *  be found in the AUTHORS file in the root of the source tree.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *  1. Redistributions of source code must retain the above copyright notice,
+ *     this list of conditions and the following disclaimer.
+ *  2. Redistributions in binary form must reproduce the above copyright notice,
+ *     this list of conditions and the following disclaimer in the documentation
+ *     and/or other materials provided with the distribution.
+ *  3. The name of the author may not be used to endorse or promote products
+ *     derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
 #import <Foundation/Foundation.h>
diff --git a/talk/app/webrtc/peerconnection.cc b/webrtc/api/peerconnection.cc
similarity index 98%
rename from talk/app/webrtc/peerconnection.cc
rename to webrtc/api/peerconnection.cc
index c423b0f..cdc5861 100644
--- a/talk/app/webrtc/peerconnection.cc
+++ b/webrtc/api/peerconnection.cc
@@ -25,30 +25,30 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/peerconnection.h"
+#include "webrtc/api/peerconnection.h"
 
 #include <algorithm>
 #include <cctype>  // for isdigit
 #include <utility>
 #include <vector>
 
-#include "talk/app/webrtc/audiotrack.h"
-#include "talk/app/webrtc/dtmfsender.h"
-#include "talk/app/webrtc/jsepicecandidate.h"
-#include "talk/app/webrtc/jsepsessiondescription.h"
-#include "talk/app/webrtc/mediaconstraintsinterface.h"
-#include "talk/app/webrtc/mediastream.h"
-#include "talk/app/webrtc/mediastreamobserver.h"
-#include "talk/app/webrtc/mediastreamproxy.h"
-#include "talk/app/webrtc/mediastreamtrackproxy.h"
-#include "talk/app/webrtc/remoteaudiosource.h"
-#include "talk/app/webrtc/remotevideocapturer.h"
-#include "talk/app/webrtc/rtpreceiver.h"
-#include "talk/app/webrtc/rtpsender.h"
-#include "talk/app/webrtc/streamcollection.h"
-#include "talk/app/webrtc/videosource.h"
-#include "talk/app/webrtc/videotrack.h"
 #include "talk/session/media/channelmanager.h"
+#include "webrtc/api/audiotrack.h"
+#include "webrtc/api/dtmfsender.h"
+#include "webrtc/api/jsepicecandidate.h"
+#include "webrtc/api/jsepsessiondescription.h"
+#include "webrtc/api/mediaconstraintsinterface.h"
+#include "webrtc/api/mediastream.h"
+#include "webrtc/api/mediastreamobserver.h"
+#include "webrtc/api/mediastreamproxy.h"
+#include "webrtc/api/mediastreamtrackproxy.h"
+#include "webrtc/api/remoteaudiosource.h"
+#include "webrtc/api/remotevideocapturer.h"
+#include "webrtc/api/rtpreceiver.h"
+#include "webrtc/api/rtpsender.h"
+#include "webrtc/api/streamcollection.h"
+#include "webrtc/api/videosource.h"
+#include "webrtc/api/videotrack.h"
 #include "webrtc/base/arraysize.h"
 #include "webrtc/base/logging.h"
 #include "webrtc/base/stringencode.h"
diff --git a/talk/app/webrtc/peerconnection.h b/webrtc/api/peerconnection.h
similarity index 96%
rename from talk/app/webrtc/peerconnection.h
rename to webrtc/api/peerconnection.h
index dce24fd..c7de19d 100644
--- a/talk/app/webrtc/peerconnection.h
+++ b/webrtc/api/peerconnection.h
@@ -25,19 +25,19 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_PEERCONNECTION_H_
-#define TALK_APP_WEBRTC_PEERCONNECTION_H_
+#ifndef WEBRTC_API_PEERCONNECTION_H_
+#define WEBRTC_API_PEERCONNECTION_H_
 
 #include <string>
 
-#include "talk/app/webrtc/dtlsidentitystore.h"
-#include "talk/app/webrtc/peerconnectionfactory.h"
-#include "talk/app/webrtc/peerconnectioninterface.h"
-#include "talk/app/webrtc/rtpreceiverinterface.h"
-#include "talk/app/webrtc/rtpsenderinterface.h"
-#include "talk/app/webrtc/statscollector.h"
-#include "talk/app/webrtc/streamcollection.h"
-#include "talk/app/webrtc/webrtcsession.h"
+#include "webrtc/api/dtlsidentitystore.h"
+#include "webrtc/api/peerconnectionfactory.h"
+#include "webrtc/api/peerconnectioninterface.h"
+#include "webrtc/api/rtpreceiverinterface.h"
+#include "webrtc/api/rtpsenderinterface.h"
+#include "webrtc/api/statscollector.h"
+#include "webrtc/api/streamcollection.h"
+#include "webrtc/api/webrtcsession.h"
 #include "webrtc/base/scoped_ptr.h"
 
 namespace webrtc {
@@ -396,4 +396,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_PEERCONNECTION_H_
+#endif  // WEBRTC_API_PEERCONNECTION_H_
diff --git a/talk/app/webrtc/peerconnection_unittest.cc b/webrtc/api/peerconnection_unittest.cc
similarity index 98%
rename from talk/app/webrtc/peerconnection_unittest.cc
rename to webrtc/api/peerconnection_unittest.cc
index cad13e2..c1e7e3d 100644
--- a/talk/app/webrtc/peerconnection_unittest.cc
+++ b/webrtc/api/peerconnection_unittest.cc
@@ -33,21 +33,21 @@
 #include <utility>
 #include <vector>
 
-#include "talk/app/webrtc/dtmfsender.h"
-#include "talk/app/webrtc/fakemetricsobserver.h"
-#include "talk/app/webrtc/localaudiosource.h"
-#include "talk/app/webrtc/mediastreaminterface.h"
-#include "talk/app/webrtc/peerconnection.h"
-#include "talk/app/webrtc/peerconnectionfactory.h"
-#include "talk/app/webrtc/peerconnectioninterface.h"
-#include "talk/app/webrtc/test/fakeaudiocapturemodule.h"
-#include "talk/app/webrtc/test/fakeconstraints.h"
-#include "talk/app/webrtc/test/fakedtlsidentitystore.h"
-#include "talk/app/webrtc/test/fakeperiodicvideocapturer.h"
-#include "talk/app/webrtc/test/fakevideotrackrenderer.h"
-#include "talk/app/webrtc/test/mockpeerconnectionobservers.h"
-#include "talk/app/webrtc/videosourceinterface.h"
 #include "talk/session/media/mediasession.h"
+#include "webrtc/api/dtmfsender.h"
+#include "webrtc/api/fakemetricsobserver.h"
+#include "webrtc/api/localaudiosource.h"
+#include "webrtc/api/mediastreaminterface.h"
+#include "webrtc/api/peerconnection.h"
+#include "webrtc/api/peerconnectionfactory.h"
+#include "webrtc/api/peerconnectioninterface.h"
+#include "webrtc/api/test/fakeaudiocapturemodule.h"
+#include "webrtc/api/test/fakeconstraints.h"
+#include "webrtc/api/test/fakedtlsidentitystore.h"
+#include "webrtc/api/test/fakeperiodicvideocapturer.h"
+#include "webrtc/api/test/fakevideotrackrenderer.h"
+#include "webrtc/api/test/mockpeerconnectionobservers.h"
+#include "webrtc/api/videosourceinterface.h"
 #include "webrtc/base/gunit.h"
 #include "webrtc/base/physicalsocketserver.h"
 #include "webrtc/base/scoped_ptr.h"
diff --git a/talk/peerconnection_unittests.isolate b/webrtc/api/peerconnection_unittests.isolate
similarity index 100%
rename from talk/peerconnection_unittests.isolate
rename to webrtc/api/peerconnection_unittests.isolate
diff --git a/talk/app/webrtc/peerconnectionendtoend_unittest.cc b/webrtc/api/peerconnectionendtoend_unittest.cc
similarity index 98%
rename from talk/app/webrtc/peerconnectionendtoend_unittest.cc
rename to webrtc/api/peerconnectionendtoend_unittest.cc
index f71ce61..adcfe57 100644
--- a/talk/app/webrtc/peerconnectionendtoend_unittest.cc
+++ b/webrtc/api/peerconnectionendtoend_unittest.cc
@@ -25,11 +25,11 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/test/peerconnectiontestwrapper.h"
+#include "webrtc/api/test/peerconnectiontestwrapper.h"
 // Notice that mockpeerconnectionobservers.h must be included after the above!
-#include "talk/app/webrtc/test/mockpeerconnectionobservers.h"
+#include "webrtc/api/test/mockpeerconnectionobservers.h"
 #ifdef WEBRTC_ANDROID
-#include "talk/app/webrtc/test/androidtestinitializer.h"
+#include "webrtc/api/test/androidtestinitializer.h"
 #endif
 #include "webrtc/base/gunit.h"
 #include "webrtc/base/logging.h"
diff --git a/talk/app/webrtc/peerconnectionfactory.cc b/webrtc/api/peerconnectionfactory.cc
similarity index 94%
rename from talk/app/webrtc/peerconnectionfactory.cc
rename to webrtc/api/peerconnectionfactory.cc
index a781eb3..66545930 100644
--- a/talk/app/webrtc/peerconnectionfactory.cc
+++ b/webrtc/api/peerconnectionfactory.cc
@@ -1,6 +1,6 @@
 /*
  * libjingle
- * Copyright 2004--2011 Google Inc.
+ * Copyright 2004 Google Inc.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -25,21 +25,21 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/peerconnectionfactory.h"
+#include "webrtc/api/peerconnectionfactory.h"
 
 #include <utility>
 
-#include "talk/app/webrtc/audiotrack.h"
-#include "talk/app/webrtc/localaudiosource.h"
-#include "talk/app/webrtc/mediastream.h"
-#include "talk/app/webrtc/mediastreamproxy.h"
-#include "talk/app/webrtc/mediastreamtrackproxy.h"
-#include "talk/app/webrtc/peerconnection.h"
-#include "talk/app/webrtc/peerconnectionfactoryproxy.h"
-#include "talk/app/webrtc/peerconnectionproxy.h"
-#include "talk/app/webrtc/videosource.h"
-#include "talk/app/webrtc/videosourceproxy.h"
-#include "talk/app/webrtc/videotrack.h"
+#include "webrtc/api/audiotrack.h"
+#include "webrtc/api/localaudiosource.h"
+#include "webrtc/api/mediastream.h"
+#include "webrtc/api/mediastreamproxy.h"
+#include "webrtc/api/mediastreamtrackproxy.h"
+#include "webrtc/api/peerconnection.h"
+#include "webrtc/api/peerconnectionfactoryproxy.h"
+#include "webrtc/api/peerconnectionproxy.h"
+#include "webrtc/api/videosource.h"
+#include "webrtc/api/videosourceproxy.h"
+#include "webrtc/api/videotrack.h"
 #include "webrtc/base/bind.h"
 #include "webrtc/media/webrtc/webrtcmediaengine.h"
 #include "webrtc/media/webrtc/webrtcvideodecoderfactory.h"
diff --git a/talk/app/webrtc/peerconnectionfactory.h b/webrtc/api/peerconnectionfactory.h
similarity index 93%
rename from talk/app/webrtc/peerconnectionfactory.h
rename to webrtc/api/peerconnectionfactory.h
index a38218a..7011736 100644
--- a/talk/app/webrtc/peerconnectionfactory.h
+++ b/webrtc/api/peerconnectionfactory.h
@@ -25,16 +25,16 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_PEERCONNECTIONFACTORY_H_
-#define TALK_APP_WEBRTC_PEERCONNECTIONFACTORY_H_
+#ifndef WEBRTC_API_PEERCONNECTIONFACTORY_H_
+#define WEBRTC_API_PEERCONNECTIONFACTORY_H_
 
 #include <string>
 
-#include "talk/app/webrtc/dtlsidentitystore.h"
-#include "talk/app/webrtc/mediacontroller.h"
-#include "talk/app/webrtc/mediastreaminterface.h"
-#include "talk/app/webrtc/peerconnectioninterface.h"
 #include "talk/session/media/channelmanager.h"
+#include "webrtc/api/dtlsidentitystore.h"
+#include "webrtc/api/mediacontroller.h"
+#include "webrtc/api/mediastreaminterface.h"
+#include "webrtc/api/peerconnectioninterface.h"
 #include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/scoped_ref_ptr.h"
 #include "webrtc/base/thread.h"
@@ -129,4 +129,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_PEERCONNECTIONFACTORY_H_
+#endif  // WEBRTC_API_PEERCONNECTIONFACTORY_H_
diff --git a/talk/app/webrtc/peerconnectionfactory_unittest.cc b/webrtc/api/peerconnectionfactory_unittest.cc
similarity index 97%
rename from talk/app/webrtc/peerconnectionfactory_unittest.cc
rename to webrtc/api/peerconnectionfactory_unittest.cc
index d0d2f00..a526ea5 100644
--- a/talk/app/webrtc/peerconnectionfactory_unittest.cc
+++ b/webrtc/api/peerconnectionfactory_unittest.cc
@@ -28,14 +28,14 @@
 #include <string>
 #include <utility>
 
-#include "talk/app/webrtc/mediastreaminterface.h"
-#include "talk/app/webrtc/peerconnectionfactory.h"
+#include "webrtc/api/mediastreaminterface.h"
+#include "webrtc/api/peerconnectionfactory.h"
 #ifdef WEBRTC_ANDROID
-#include "talk/app/webrtc/test/androidtestinitializer.h"
+#include "webrtc/api/test/androidtestinitializer.h"
 #endif
-#include "talk/app/webrtc/test/fakedtlsidentitystore.h"
-#include "talk/app/webrtc/test/fakevideotrackrenderer.h"
-#include "talk/app/webrtc/videosourceinterface.h"
+#include "webrtc/api/test/fakedtlsidentitystore.h"
+#include "webrtc/api/test/fakevideotrackrenderer.h"
+#include "webrtc/api/videosourceinterface.h"
 #include "webrtc/base/gunit.h"
 #include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/thread.h"
diff --git a/talk/app/webrtc/peerconnectionfactoryproxy.h b/webrtc/api/peerconnectionfactoryproxy.h
similarity index 93%
rename from talk/app/webrtc/peerconnectionfactoryproxy.h
rename to webrtc/api/peerconnectionfactoryproxy.h
index 1d0b6aa..65f0969 100644
--- a/talk/app/webrtc/peerconnectionfactoryproxy.h
+++ b/webrtc/api/peerconnectionfactoryproxy.h
@@ -25,14 +25,14 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_PEERCONNECTIONFACTORYPROXY_H_
-#define TALK_APP_WEBRTC_PEERCONNECTIONFACTORYPROXY_H_
+#ifndef WEBRTC_API_PEERCONNECTIONFACTORYPROXY_H_
+#define WEBRTC_API_PEERCONNECTIONFACTORYPROXY_H_
 
 #include <string>
 #include <utility>
 
-#include "talk/app/webrtc/peerconnectioninterface.h"
-#include "talk/app/webrtc/proxy.h"
+#include "webrtc/api/peerconnectioninterface.h"
+#include "webrtc/api/proxy.h"
 #include "webrtc/base/bind.h"
 
 namespace webrtc {
@@ -83,4 +83,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_PEERCONNECTIONFACTORYPROXY_H_
+#endif  // WEBRTC_API_PEERCONNECTIONFACTORYPROXY_H_
diff --git a/talk/app/webrtc/peerconnectioninterface.h b/webrtc/api/peerconnectioninterface.h
similarity index 97%
rename from talk/app/webrtc/peerconnectioninterface.h
rename to webrtc/api/peerconnectioninterface.h
index 940f0fb..5cdb097 100644
--- a/talk/app/webrtc/peerconnectioninterface.h
+++ b/webrtc/api/peerconnectioninterface.h
@@ -65,23 +65,23 @@
 // 7. Once a candidate have been found PeerConnection will call the observer
 // function OnIceCandidate. Send these candidates to the remote peer.
 
-#ifndef TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_
-#define TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_
+#ifndef WEBRTC_API_PEERCONNECTIONINTERFACE_H_
+#define WEBRTC_API_PEERCONNECTIONINTERFACE_H_
 
 #include <string>
 #include <utility>
 #include <vector>
 
-#include "talk/app/webrtc/datachannelinterface.h"
-#include "talk/app/webrtc/dtlsidentitystore.h"
-#include "talk/app/webrtc/dtlsidentitystore.h"
-#include "talk/app/webrtc/dtmfsenderinterface.h"
-#include "talk/app/webrtc/jsep.h"
-#include "talk/app/webrtc/mediastreaminterface.h"
-#include "talk/app/webrtc/rtpreceiverinterface.h"
-#include "talk/app/webrtc/rtpsenderinterface.h"
-#include "talk/app/webrtc/statstypes.h"
-#include "talk/app/webrtc/umametrics.h"
+#include "webrtc/api/datachannelinterface.h"
+#include "webrtc/api/dtlsidentitystore.h"
+#include "webrtc/api/dtlsidentitystore.h"
+#include "webrtc/api/dtmfsenderinterface.h"
+#include "webrtc/api/jsep.h"
+#include "webrtc/api/mediastreaminterface.h"
+#include "webrtc/api/rtpreceiverinterface.h"
+#include "webrtc/api/rtpsenderinterface.h"
+#include "webrtc/api/statstypes.h"
+#include "webrtc/api/umametrics.h"
 #include "webrtc/base/fileutils.h"
 #include "webrtc/base/network.h"
 #include "webrtc/base/rtccertificate.h"
@@ -619,4 +619,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_
+#endif  // WEBRTC_API_PEERCONNECTIONINTERFACE_H_
diff --git a/talk/app/webrtc/peerconnectioninterface_unittest.cc b/webrtc/api/peerconnectioninterface_unittest.cc
similarity index 98%
rename from talk/app/webrtc/peerconnectioninterface_unittest.cc
rename to webrtc/api/peerconnectioninterface_unittest.cc
index c29718f..b93cd77 100644
--- a/talk/app/webrtc/peerconnectioninterface_unittest.cc
+++ b/webrtc/api/peerconnectioninterface_unittest.cc
@@ -28,25 +28,25 @@
 #include <string>
 #include <utility>
 
-#include "talk/app/webrtc/audiotrack.h"
-#include "talk/app/webrtc/jsepsessiondescription.h"
-#include "talk/app/webrtc/mediastream.h"
-#include "talk/app/webrtc/mediastreaminterface.h"
-#include "talk/app/webrtc/peerconnection.h"
-#include "talk/app/webrtc/peerconnectioninterface.h"
-#include "talk/app/webrtc/rtpreceiverinterface.h"
-#include "talk/app/webrtc/rtpsenderinterface.h"
-#include "talk/app/webrtc/streamcollection.h"
-#ifdef WEBRTC_ANDROID
-#include "talk/app/webrtc/test/androidtestinitializer.h"
-#endif
-#include "talk/app/webrtc/test/fakeconstraints.h"
-#include "talk/app/webrtc/test/fakedtlsidentitystore.h"
-#include "talk/app/webrtc/test/mockpeerconnectionobservers.h"
-#include "talk/app/webrtc/test/testsdpstrings.h"
-#include "talk/app/webrtc/videosource.h"
-#include "talk/app/webrtc/videotrack.h"
 #include "talk/session/media/mediasession.h"
+#include "webrtc/api/audiotrack.h"
+#include "webrtc/api/jsepsessiondescription.h"
+#include "webrtc/api/mediastream.h"
+#include "webrtc/api/mediastreaminterface.h"
+#include "webrtc/api/peerconnection.h"
+#include "webrtc/api/peerconnectioninterface.h"
+#include "webrtc/api/rtpreceiverinterface.h"
+#include "webrtc/api/rtpsenderinterface.h"
+#include "webrtc/api/streamcollection.h"
+#ifdef WEBRTC_ANDROID
+#include "webrtc/api/test/androidtestinitializer.h"
+#endif
+#include "webrtc/api/test/fakeconstraints.h"
+#include "webrtc/api/test/fakedtlsidentitystore.h"
+#include "webrtc/api/test/mockpeerconnectionobservers.h"
+#include "webrtc/api/test/testsdpstrings.h"
+#include "webrtc/api/videosource.h"
+#include "webrtc/api/videotrack.h"
 #include "webrtc/base/gunit.h"
 #include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/ssladapter.h"
diff --git a/talk/app/webrtc/peerconnectionproxy.h b/webrtc/api/peerconnectionproxy.h
similarity index 94%
rename from talk/app/webrtc/peerconnectionproxy.h
rename to webrtc/api/peerconnectionproxy.h
index d76a6b8..9faf014 100644
--- a/talk/app/webrtc/peerconnectionproxy.h
+++ b/webrtc/api/peerconnectionproxy.h
@@ -25,11 +25,11 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_PEERCONNECTIONPROXY_H_
-#define TALK_APP_WEBRTC_PEERCONNECTIONPROXY_H_
+#ifndef WEBRTC_API_PEERCONNECTIONPROXY_H_
+#define WEBRTC_API_PEERCONNECTIONPROXY_H_
 
-#include "talk/app/webrtc/peerconnectioninterface.h"
-#include "talk/app/webrtc/proxy.h"
+#include "webrtc/api/peerconnectioninterface.h"
+#include "webrtc/api/proxy.h"
 
 namespace webrtc {
 
@@ -85,4 +85,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_PEERCONNECTIONPROXY_H_
+#endif  // WEBRTC_API_PEERCONNECTIONPROXY_H_
diff --git a/talk/app/webrtc/portallocatorfactory.cc b/webrtc/api/portallocatorfactory.cc
similarity index 96%
rename from talk/app/webrtc/portallocatorfactory.cc
rename to webrtc/api/portallocatorfactory.cc
index 64d714c..a5a98b0 100644
--- a/talk/app/webrtc/portallocatorfactory.cc
+++ b/webrtc/api/portallocatorfactory.cc
@@ -27,4 +27,4 @@
 // TODO(deadbeef): Remove this file once chromium build files no longer
 // reference it.
 
-#include "talk/app/webrtc/portallocatorfactory.h"
+#include "webrtc/api/portallocatorfactory.h"
diff --git a/talk/app/webrtc/portallocatorfactory.cc b/webrtc/api/portallocatorfactory.h
similarity index 91%
copy from talk/app/webrtc/portallocatorfactory.cc
copy to webrtc/api/portallocatorfactory.h
index 64d714c..bce7131 100644
--- a/talk/app/webrtc/portallocatorfactory.cc
+++ b/webrtc/api/portallocatorfactory.h
@@ -27,4 +27,7 @@
 // TODO(deadbeef): Remove this file once chromium build files no longer
 // reference it.
 
-#include "talk/app/webrtc/portallocatorfactory.h"
+#ifndef WEBRTC_API_PORTALLOCATORFACTORY_H_
+#define WEBRTC_API_PORTALLOCATORFACTORY_H_
+
+#endif  // WEBRTC_API_PORTALLOCATORFACTORY_H_
diff --git a/talk/app/webrtc/proxy.h b/webrtc/api/proxy.h
similarity index 98%
rename from talk/app/webrtc/proxy.h
rename to webrtc/api/proxy.h
index 76a5c1e..384e189 100644
--- a/talk/app/webrtc/proxy.h
+++ b/webrtc/api/proxy.h
@@ -52,8 +52,8 @@
 //
 // The proxy can be created using TestProxy::Create(Thread*, TestInterface*).
 
-#ifndef TALK_APP_WEBRTC_PROXY_H_
-#define TALK_APP_WEBRTC_PROXY_H_
+#ifndef WEBRTC_API_PROXY_H_
+#define WEBRTC_API_PROXY_H_
 
 #include "webrtc/base/event.h"
 #include "webrtc/base/thread.h"
@@ -388,4 +388,4 @@
 
 }  // namespace webrtc
 
-#endif  //  TALK_APP_WEBRTC_PROXY_H_
+#endif  //  WEBRTC_API_PROXY_H_
diff --git a/talk/app/webrtc/proxy_unittest.cc b/webrtc/api/proxy_unittest.cc
similarity index 98%
rename from talk/app/webrtc/proxy_unittest.cc
rename to webrtc/api/proxy_unittest.cc
index 6fc89a5..8fa7363 100644
--- a/talk/app/webrtc/proxy_unittest.cc
+++ b/webrtc/api/proxy_unittest.cc
@@ -25,7 +25,7 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/proxy.h"
+#include "webrtc/api/proxy.h"
 
 #include <string>
 
diff --git a/talk/app/webrtc/remoteaudiosource.cc b/webrtc/api/remoteaudiosource.cc
similarity index 97%
rename from talk/app/webrtc/remoteaudiosource.cc
rename to webrtc/api/remoteaudiosource.cc
index e904dd9..9a0900d 100644
--- a/talk/app/webrtc/remoteaudiosource.cc
+++ b/webrtc/api/remoteaudiosource.cc
@@ -25,13 +25,13 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/remoteaudiosource.h"
+#include "webrtc/api/remoteaudiosource.h"
 
 #include <algorithm>
 #include <functional>
 #include <utility>
 
-#include "talk/app/webrtc/mediastreamprovider.h"
+#include "webrtc/api/mediastreamprovider.h"
 #include "webrtc/base/checks.h"
 #include "webrtc/base/logging.h"
 #include "webrtc/base/thread.h"
diff --git a/talk/app/webrtc/remoteaudiosource.h b/webrtc/api/remoteaudiosource.h
similarity index 93%
rename from talk/app/webrtc/remoteaudiosource.h
rename to webrtc/api/remoteaudiosource.h
index 0e28157..a46b130 100644
--- a/talk/app/webrtc/remoteaudiosource.h
+++ b/webrtc/api/remoteaudiosource.h
@@ -25,14 +25,14 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_REMOTEAUDIOSOURCE_H_
-#define TALK_APP_WEBRTC_REMOTEAUDIOSOURCE_H_
+#ifndef WEBRTC_API_REMOTEAUDIOSOURCE_H_
+#define WEBRTC_API_REMOTEAUDIOSOURCE_H_
 
 #include <list>
 #include <string>
 
-#include "talk/app/webrtc/mediastreaminterface.h"
-#include "talk/app/webrtc/notifier.h"
+#include "webrtc/api/mediastreaminterface.h"
+#include "webrtc/api/notifier.h"
 #include "webrtc/audio/audio_sink.h"
 #include "webrtc/base/criticalsection.h"
 #include "webrtc/media/base/audiorenderer.h"
@@ -93,4 +93,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_REMOTEAUDIOSOURCE_H_
+#endif  // WEBRTC_API_REMOTEAUDIOSOURCE_H_
diff --git a/talk/app/webrtc/remoteaudiotrack.cc b/webrtc/api/remoteaudiotrack.cc
similarity index 100%
rename from talk/app/webrtc/remoteaudiotrack.cc
rename to webrtc/api/remoteaudiotrack.cc
diff --git a/talk/app/webrtc/remoteaudiotrack.h b/webrtc/api/remoteaudiotrack.h
similarity index 100%
rename from talk/app/webrtc/remoteaudiotrack.h
rename to webrtc/api/remoteaudiotrack.h
diff --git a/talk/app/webrtc/remotevideocapturer.cc b/webrtc/api/remotevideocapturer.cc
similarity index 98%
rename from talk/app/webrtc/remotevideocapturer.cc
rename to webrtc/api/remotevideocapturer.cc
index 7e69eed..b7be8f8 100644
--- a/talk/app/webrtc/remotevideocapturer.cc
+++ b/webrtc/api/remotevideocapturer.cc
@@ -25,7 +25,7 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/remotevideocapturer.h"
+#include "webrtc/api/remotevideocapturer.h"
 
 #include "webrtc/base/logging.h"
 #include "webrtc/media/base/videoframe.h"
diff --git a/talk/app/webrtc/remotevideocapturer.h b/webrtc/api/remotevideocapturer.h
similarity index 92%
rename from talk/app/webrtc/remotevideocapturer.h
rename to webrtc/api/remotevideocapturer.h
index 02f48b7..15c1134 100644
--- a/talk/app/webrtc/remotevideocapturer.h
+++ b/webrtc/api/remotevideocapturer.h
@@ -25,12 +25,12 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_REMOTEVIDEOCAPTURER_H_
-#define TALK_APP_WEBRTC_REMOTEVIDEOCAPTURER_H_
+#ifndef WEBRTC_API_REMOTEVIDEOCAPTURER_H_
+#define WEBRTC_API_REMOTEVIDEOCAPTURER_H_
 
 #include <vector>
 
-#include "talk/app/webrtc/mediastreaminterface.h"
+#include "webrtc/api/mediastreaminterface.h"
 #include "webrtc/media/base/videocapturer.h"
 #include "webrtc/media/base/videorenderer.h"
 
@@ -62,4 +62,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_REMOTEVIDEOCAPTURER_H_
+#endif  // WEBRTC_API_REMOTEVIDEOCAPTURER_H_
diff --git a/talk/app/webrtc/remotevideocapturer_unittest.cc b/webrtc/api/remotevideocapturer_unittest.cc
similarity index 98%
rename from talk/app/webrtc/remotevideocapturer_unittest.cc
rename to webrtc/api/remotevideocapturer_unittest.cc
index 8e79325..f8906e3 100644
--- a/talk/app/webrtc/remotevideocapturer_unittest.cc
+++ b/webrtc/api/remotevideocapturer_unittest.cc
@@ -27,7 +27,7 @@
 
 #include <string>
 
-#include "talk/app/webrtc/remotevideocapturer.h"
+#include "webrtc/api/remotevideocapturer.h"
 #include "webrtc/base/gunit.h"
 #include "webrtc/media/webrtc/webrtcvideoframe.h"
 
diff --git a/talk/app/webrtc/rtpreceiver.cc b/webrtc/api/rtpreceiver.cc
similarity index 97%
rename from talk/app/webrtc/rtpreceiver.cc
rename to webrtc/api/rtpreceiver.cc
index 34efe5c..11d074a 100644
--- a/talk/app/webrtc/rtpreceiver.cc
+++ b/webrtc/api/rtpreceiver.cc
@@ -25,9 +25,9 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/rtpreceiver.h"
+#include "webrtc/api/rtpreceiver.h"
 
-#include "talk/app/webrtc/videosourceinterface.h"
+#include "webrtc/api/videosourceinterface.h"
 
 namespace webrtc {
 
diff --git a/talk/app/webrtc/rtpreceiver.h b/webrtc/api/rtpreceiver.h
similarity index 93%
rename from talk/app/webrtc/rtpreceiver.h
rename to webrtc/api/rtpreceiver.h
index db021ba..016ec6a 100644
--- a/talk/app/webrtc/rtpreceiver.h
+++ b/webrtc/api/rtpreceiver.h
@@ -29,13 +29,13 @@
 // An RtpReceiver associates a MediaStreamTrackInterface with an underlying
 // transport (provided by AudioProviderInterface/VideoProviderInterface)
 
-#ifndef TALK_APP_WEBRTC_RTPRECEIVER_H_
-#define TALK_APP_WEBRTC_RTPRECEIVER_H_
+#ifndef WEBRTC_API_RTPRECEIVER_H_
+#define WEBRTC_API_RTPRECEIVER_H_
 
 #include <string>
 
-#include "talk/app/webrtc/mediastreamprovider.h"
-#include "talk/app/webrtc/rtpreceiverinterface.h"
+#include "webrtc/api/mediastreamprovider.h"
+#include "webrtc/api/rtpreceiverinterface.h"
 #include "webrtc/base/basictypes.h"
 
 namespace webrtc {
@@ -101,4 +101,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_RTPRECEIVER_H_
+#endif  // WEBRTC_API_RTPRECEIVER_H_
diff --git a/talk/app/webrtc/rtpreceiverinterface.h b/webrtc/api/rtpreceiverinterface.h
similarity index 90%
rename from talk/app/webrtc/rtpreceiverinterface.h
rename to webrtc/api/rtpreceiverinterface.h
index 120a50f..961d869 100644
--- a/talk/app/webrtc/rtpreceiverinterface.h
+++ b/webrtc/api/rtpreceiverinterface.h
@@ -28,13 +28,13 @@
 // This file contains interfaces for RtpReceivers
 // http://w3c.github.io/webrtc-pc/#rtcrtpreceiver-interface
 
-#ifndef TALK_APP_WEBRTC_RTPRECEIVERINTERFACE_H_
-#define TALK_APP_WEBRTC_RTPRECEIVERINTERFACE_H_
+#ifndef WEBRTC_API_RTPRECEIVERINTERFACE_H_
+#define WEBRTC_API_RTPRECEIVERINTERFACE_H_
 
 #include <string>
 
-#include "talk/app/webrtc/mediastreaminterface.h"
-#include "talk/app/webrtc/proxy.h"
+#include "webrtc/api/mediastreaminterface.h"
+#include "webrtc/api/proxy.h"
 #include "webrtc/base/refcount.h"
 #include "webrtc/base/scoped_ref_ptr.h"
 
@@ -63,4 +63,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_RTPRECEIVERINTERFACE_H_
+#endif  // WEBRTC_API_RTPRECEIVERINTERFACE_H_
diff --git a/talk/app/webrtc/rtpsender.cc b/webrtc/api/rtpsender.cc
similarity index 98%
rename from talk/app/webrtc/rtpsender.cc
rename to webrtc/api/rtpsender.cc
index a30bf0b..f20f464 100644
--- a/talk/app/webrtc/rtpsender.cc
+++ b/webrtc/api/rtpsender.cc
@@ -25,10 +25,10 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/rtpsender.h"
+#include "webrtc/api/rtpsender.h"
 
-#include "talk/app/webrtc/localaudiosource.h"
-#include "talk/app/webrtc/videosourceinterface.h"
+#include "webrtc/api/localaudiosource.h"
+#include "webrtc/api/videosourceinterface.h"
 #include "webrtc/base/helpers.h"
 
 namespace webrtc {
diff --git a/talk/app/webrtc/rtpsender.h b/webrtc/api/rtpsender.h
similarity index 95%
rename from talk/app/webrtc/rtpsender.h
rename to webrtc/api/rtpsender.h
index c68f64b..45b765d 100644
--- a/talk/app/webrtc/rtpsender.h
+++ b/webrtc/api/rtpsender.h
@@ -29,14 +29,14 @@
 // An RtpSender associates a MediaStreamTrackInterface with an underlying
 // transport (provided by AudioProviderInterface/VideoProviderInterface)
 
-#ifndef TALK_APP_WEBRTC_RTPSENDER_H_
-#define TALK_APP_WEBRTC_RTPSENDER_H_
+#ifndef WEBRTC_API_RTPSENDER_H_
+#define WEBRTC_API_RTPSENDER_H_
 
 #include <string>
 
-#include "talk/app/webrtc/mediastreamprovider.h"
-#include "talk/app/webrtc/rtpsenderinterface.h"
-#include "talk/app/webrtc/statscollector.h"
+#include "webrtc/api/mediastreamprovider.h"
+#include "webrtc/api/rtpsenderinterface.h"
+#include "webrtc/api/statscollector.h"
 #include "webrtc/base/basictypes.h"
 #include "webrtc/base/criticalsection.h"
 #include "webrtc/base/scoped_ptr.h"
@@ -192,4 +192,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_RTPSENDER_H_
+#endif  // WEBRTC_API_RTPSENDER_H_
diff --git a/talk/app/webrtc/rtpsenderinterface.h b/webrtc/api/rtpsenderinterface.h
similarity index 93%
rename from talk/app/webrtc/rtpsenderinterface.h
rename to webrtc/api/rtpsenderinterface.h
index f96ff1e..740e985 100644
--- a/talk/app/webrtc/rtpsenderinterface.h
+++ b/webrtc/api/rtpsenderinterface.h
@@ -28,14 +28,14 @@
 // This file contains interfaces for RtpSenders
 // http://w3c.github.io/webrtc-pc/#rtcrtpsender-interface
 
-#ifndef TALK_APP_WEBRTC_RTPSENDERINTERFACE_H_
-#define TALK_APP_WEBRTC_RTPSENDERINTERFACE_H_
+#ifndef WEBRTC_API_RTPSENDERINTERFACE_H_
+#define WEBRTC_API_RTPSENDERINTERFACE_H_
 
 #include <string>
 
-#include "talk/app/webrtc/mediastreaminterface.h"
-#include "talk/app/webrtc/proxy.h"
 #include "talk/session/media/mediasession.h"
+#include "webrtc/api/mediastreaminterface.h"
+#include "webrtc/api/proxy.h"
 #include "webrtc/base/refcount.h"
 #include "webrtc/base/scoped_ref_ptr.h"
 
@@ -87,4 +87,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_RTPSENDERINTERFACE_H_
+#endif  // WEBRTC_API_RTPSENDERINTERFACE_H_
diff --git a/talk/app/webrtc/rtpsenderreceiver_unittest.cc b/webrtc/api/rtpsenderreceiver_unittest.cc
similarity index 97%
rename from talk/app/webrtc/rtpsenderreceiver_unittest.cc
rename to webrtc/api/rtpsenderreceiver_unittest.cc
index bcd9ea0..faca657 100644
--- a/talk/app/webrtc/rtpsenderreceiver_unittest.cc
+++ b/webrtc/api/rtpsenderreceiver_unittest.cc
@@ -28,16 +28,16 @@
 #include <string>
 #include <utility>
 
-#include "talk/app/webrtc/audiotrack.h"
-#include "talk/app/webrtc/mediastream.h"
-#include "talk/app/webrtc/remoteaudiosource.h"
-#include "talk/app/webrtc/rtpreceiver.h"
-#include "talk/app/webrtc/rtpsender.h"
-#include "talk/app/webrtc/streamcollection.h"
-#include "talk/app/webrtc/videosource.h"
-#include "talk/app/webrtc/videotrack.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/api/audiotrack.h"
+#include "webrtc/api/mediastream.h"
+#include "webrtc/api/remoteaudiosource.h"
+#include "webrtc/api/rtpreceiver.h"
+#include "webrtc/api/rtpsender.h"
+#include "webrtc/api/streamcollection.h"
+#include "webrtc/api/videosource.h"
+#include "webrtc/api/videotrack.h"
 #include "webrtc/base/gunit.h"
 #include "webrtc/media/base/fakevideocapturer.h"
 #include "webrtc/media/base/mediachannel.h"
diff --git a/talk/app/webrtc/sctputils.cc b/webrtc/api/sctputils.cc
similarity index 98%
rename from talk/app/webrtc/sctputils.cc
rename to webrtc/api/sctputils.cc
index 2239599..84cb293 100644
--- a/talk/app/webrtc/sctputils.cc
+++ b/webrtc/api/sctputils.cc
@@ -25,7 +25,7 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/sctputils.h"
+#include "webrtc/api/sctputils.h"
 
 #include "webrtc/base/buffer.h"
 #include "webrtc/base/bytebuffer.h"
diff --git a/talk/app/webrtc/sctputils.h b/webrtc/api/sctputils.h
similarity index 92%
rename from talk/app/webrtc/sctputils.h
rename to webrtc/api/sctputils.h
index f16873c..a3bdb5c 100644
--- a/talk/app/webrtc/sctputils.h
+++ b/webrtc/api/sctputils.h
@@ -25,12 +25,12 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_SCTPUTILS_H_
-#define TALK_APP_WEBRTC_SCTPUTILS_H_
+#ifndef WEBRTC_API_SCTPUTILS_H_
+#define WEBRTC_API_SCTPUTILS_H_
 
 #include <string>
 
-#include "talk/app/webrtc/datachannelinterface.h"
+#include "webrtc/api/datachannelinterface.h"
 
 namespace rtc {
 class Buffer;
@@ -55,4 +55,4 @@
 void WriteDataChannelOpenAckMessage(rtc::Buffer* payload);
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_SCTPUTILS_H_
+#endif  // WEBRTC_API_SCTPUTILS_H_
diff --git a/talk/app/webrtc/sctputils_unittest.cc b/webrtc/api/sctputils_unittest.cc
similarity index 98%
rename from talk/app/webrtc/sctputils_unittest.cc
rename to webrtc/api/sctputils_unittest.cc
index e0e203f..8e29d4c 100644
--- a/talk/app/webrtc/sctputils_unittest.cc
+++ b/webrtc/api/sctputils_unittest.cc
@@ -25,7 +25,7 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/sctputils.h"
+#include "webrtc/api/sctputils.h"
 #include "webrtc/base/bytebuffer.h"
 #include "webrtc/base/gunit.h"
 
diff --git a/talk/app/webrtc/statscollector.cc b/webrtc/api/statscollector.cc
similarity index 99%
rename from talk/app/webrtc/statscollector.cc
rename to webrtc/api/statscollector.cc
index 883766a..c326ea1 100644
--- a/talk/app/webrtc/statscollector.cc
+++ b/webrtc/api/statscollector.cc
@@ -25,12 +25,12 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/statscollector.h"
+#include "webrtc/api/statscollector.h"
 
 #include <utility>
 #include <vector>
 
-#include "talk/app/webrtc/peerconnection.h"
+#include "webrtc/api/peerconnection.h"
 #include "talk/session/media/channel.h"
 #include "webrtc/base/base64.h"
 #include "webrtc/base/checks.h"
diff --git a/talk/app/webrtc/statscollector.h b/webrtc/api/statscollector.h
similarity index 95%
rename from talk/app/webrtc/statscollector.h
rename to webrtc/api/statscollector.h
index 56db79d..caeac82 100644
--- a/talk/app/webrtc/statscollector.h
+++ b/webrtc/api/statscollector.h
@@ -28,17 +28,17 @@
 // This file contains a class used for gathering statistics from an ongoing
 // libjingle PeerConnection.
 
-#ifndef TALK_APP_WEBRTC_STATSCOLLECTOR_H_
-#define TALK_APP_WEBRTC_STATSCOLLECTOR_H_
+#ifndef WEBRTC_API_STATSCOLLECTOR_H_
+#define WEBRTC_API_STATSCOLLECTOR_H_
 
 #include <map>
 #include <string>
 #include <vector>
 
-#include "talk/app/webrtc/mediastreaminterface.h"
-#include "talk/app/webrtc/peerconnectioninterface.h"
-#include "talk/app/webrtc/statstypes.h"
-#include "talk/app/webrtc/webrtcsession.h"
+#include "webrtc/api/mediastreaminterface.h"
+#include "webrtc/api/peerconnectioninterface.h"
+#include "webrtc/api/statstypes.h"
+#include "webrtc/api/webrtcsession.h"
 
 namespace webrtc {
 
@@ -166,4 +166,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_STATSCOLLECTOR_H_
+#endif  // WEBRTC_API_STATSCOLLECTOR_H_
diff --git a/talk/app/webrtc/statscollector_unittest.cc b/webrtc/api/statscollector_unittest.cc
similarity index 98%
rename from talk/app/webrtc/statscollector_unittest.cc
rename to webrtc/api/statscollector_unittest.cc
index 1b16b0c..b99aa12 100644
--- a/talk/app/webrtc/statscollector_unittest.cc
+++ b/webrtc/api/statscollector_unittest.cc
@@ -29,18 +29,18 @@
 
 #include <algorithm>
 
-#include "talk/app/webrtc/statscollector.h"
+#include "webrtc/api/statscollector.h"
 
-#include "talk/app/webrtc/mediastream.h"
-#include "talk/app/webrtc/mediastreaminterface.h"
-#include "talk/app/webrtc/mediastreamtrack.h"
-#include "talk/app/webrtc/peerconnection.h"
-#include "talk/app/webrtc/peerconnectionfactory.h"
-#include "talk/app/webrtc/test/fakedatachannelprovider.h"
-#include "talk/app/webrtc/videotrack.h"
 #include "talk/session/media/channelmanager.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/api/mediastream.h"
+#include "webrtc/api/mediastreaminterface.h"
+#include "webrtc/api/mediastreamtrack.h"
+#include "webrtc/api/peerconnection.h"
+#include "webrtc/api/peerconnectionfactory.h"
+#include "webrtc/api/test/fakedatachannelprovider.h"
+#include "webrtc/api/videotrack.h"
 #include "webrtc/base/base64.h"
 #include "webrtc/base/fakesslidentity.h"
 #include "webrtc/base/gunit.h"
diff --git a/talk/app/webrtc/statstypes.cc b/webrtc/api/statstypes.cc
similarity index 99%
rename from talk/app/webrtc/statstypes.cc
rename to webrtc/api/statstypes.cc
index 954f90f..ab58cb1 100644
--- a/talk/app/webrtc/statstypes.cc
+++ b/webrtc/api/statstypes.cc
@@ -25,7 +25,7 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/statstypes.h"
+#include "webrtc/api/statstypes.h"
 
 #include <string.h>
 
diff --git a/talk/app/webrtc/statstypes.h b/webrtc/api/statstypes.h
similarity index 98%
rename from talk/app/webrtc/statstypes.h
rename to webrtc/api/statstypes.h
index 6f547e1..753cba6 100644
--- a/talk/app/webrtc/statstypes.h
+++ b/webrtc/api/statstypes.h
@@ -28,8 +28,8 @@
 // This file contains structures used for retrieving statistics from an ongoing
 // libjingle session.
 
-#ifndef TALK_APP_WEBRTC_STATSTYPES_H_
-#define TALK_APP_WEBRTC_STATSTYPES_H_
+#ifndef WEBRTC_API_STATSTYPES_H_
+#define WEBRTC_API_STATSTYPES_H_
 
 #include <algorithm>
 #include <list>
@@ -416,4 +416,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_STATSTYPES_H_
+#endif  // WEBRTC_API_STATSTYPES_H_
diff --git a/talk/app/webrtc/streamcollection.h b/webrtc/api/streamcollection.h
similarity index 95%
rename from talk/app/webrtc/streamcollection.h
rename to webrtc/api/streamcollection.h
index 07a30a6..fc9a891 100644
--- a/talk/app/webrtc/streamcollection.h
+++ b/webrtc/api/streamcollection.h
@@ -25,13 +25,13 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_STREAMCOLLECTION_H_
-#define TALK_APP_WEBRTC_STREAMCOLLECTION_H_
+#ifndef WEBRTC_API_STREAMCOLLECTION_H_
+#define WEBRTC_API_STREAMCOLLECTION_H_
 
 #include <string>
 #include <vector>
 
-#include "talk/app/webrtc/peerconnectioninterface.h"
+#include "webrtc/api/peerconnectioninterface.h"
 
 namespace webrtc {
 
@@ -122,4 +122,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_STREAMCOLLECTION_H_
+#endif  // WEBRTC_API_STREAMCOLLECTION_H_
diff --git a/talk/app/webrtc/test/DEPS b/webrtc/api/test/DEPS
similarity index 100%
rename from talk/app/webrtc/test/DEPS
rename to webrtc/api/test/DEPS
diff --git a/talk/app/webrtc/test/androidtestinitializer.cc b/webrtc/api/test/androidtestinitializer.cc
similarity index 94%
rename from talk/app/webrtc/test/androidtestinitializer.cc
rename to webrtc/api/test/androidtestinitializer.cc
index 883c2d8..17118c0 100644
--- a/talk/app/webrtc/test/androidtestinitializer.cc
+++ b/webrtc/api/test/androidtestinitializer.cc
@@ -25,7 +25,7 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/test/androidtestinitializer.h"
+#include "webrtc/api/test/androidtestinitializer.h"
 
 #include <pthread.h>
 
@@ -36,8 +36,8 @@
 #include "base/android/context_utils.h"
 #include "base/android/jni_android.h"
 
-#include "talk/app/webrtc/java/jni/classreferenceholder.h"
-#include "talk/app/webrtc/java/jni/jni_helpers.h"
+#include "webrtc/api/java/jni/classreferenceholder.h"
+#include "webrtc/api/java/jni/jni_helpers.h"
 #include "webrtc/base/checks.h"
 #include "webrtc/base/ssladapter.h"
 #include "webrtc/voice_engine/include/voe_base.h"
diff --git a/talk/app/webrtc/test/androidtestinitializer.h b/webrtc/api/test/androidtestinitializer.h
similarity index 89%
rename from talk/app/webrtc/test/androidtestinitializer.h
rename to webrtc/api/test/androidtestinitializer.h
index e699282..2d178ac 100644
--- a/talk/app/webrtc/test/androidtestinitializer.h
+++ b/webrtc/api/test/androidtestinitializer.h
@@ -25,8 +25,8 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_TEST_ANDROIDTESTINITIALIZER_H_
-#define TALK_APP_WEBRTC_TEST_ANDROIDTESTINITIALIZER_H_
+#ifndef WEBRTC_API_TEST_ANDROIDTESTINITIALIZER_H_
+#define WEBRTC_API_TEST_ANDROIDTESTINITIALIZER_H_
 
 namespace webrtc {
 
@@ -34,4 +34,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_TEST_ANDROIDTESTINITIALIZER_H_
+#endif  // WEBRTC_API_TEST_ANDROIDTESTINITIALIZER_H_
diff --git a/talk/app/webrtc/test/fakeaudiocapturemodule.cc b/webrtc/api/test/fakeaudiocapturemodule.cc
similarity index 99%
rename from talk/app/webrtc/test/fakeaudiocapturemodule.cc
rename to webrtc/api/test/fakeaudiocapturemodule.cc
index 3564d28..2dfa267 100644
--- a/talk/app/webrtc/test/fakeaudiocapturemodule.cc
+++ b/webrtc/api/test/fakeaudiocapturemodule.cc
@@ -25,7 +25,7 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/test/fakeaudiocapturemodule.h"
+#include "webrtc/api/test/fakeaudiocapturemodule.h"
 
 #include "webrtc/base/common.h"
 #include "webrtc/base/refcount.h"
diff --git a/talk/app/webrtc/test/fakeaudiocapturemodule.h b/webrtc/api/test/fakeaudiocapturemodule.h
similarity index 98%
rename from talk/app/webrtc/test/fakeaudiocapturemodule.h
rename to webrtc/api/test/fakeaudiocapturemodule.h
index fdac0b9..315c251 100644
--- a/talk/app/webrtc/test/fakeaudiocapturemodule.h
+++ b/webrtc/api/test/fakeaudiocapturemodule.h
@@ -34,8 +34,8 @@
 // Note P postfix of a function indicates that it should only be called by the
 // processing thread.
 
-#ifndef TALK_APP_WEBRTC_TEST_FAKEAUDIOCAPTUREMODULE_H_
-#define TALK_APP_WEBRTC_TEST_FAKEAUDIOCAPTUREMODULE_H_
+#ifndef WEBRTC_API_TEST_FAKEAUDIOCAPTUREMODULE_H_
+#define WEBRTC_API_TEST_FAKEAUDIOCAPTUREMODULE_H_
 
 #include "webrtc/base/basictypes.h"
 #include "webrtc/base/criticalsection.h"
@@ -284,4 +284,4 @@
   rtc::CriticalSection crit_callback_;
 };
 
-#endif  // TALK_APP_WEBRTC_TEST_FAKEAUDIOCAPTUREMODULE_H_
+#endif  // WEBRTC_API_TEST_FAKEAUDIOCAPTUREMODULE_H_
diff --git a/talk/app/webrtc/test/fakeaudiocapturemodule_unittest.cc b/webrtc/api/test/fakeaudiocapturemodule_unittest.cc
similarity index 98%
rename from talk/app/webrtc/test/fakeaudiocapturemodule_unittest.cc
rename to webrtc/api/test/fakeaudiocapturemodule_unittest.cc
index 4e3bafe..b95d2d7 100644
--- a/talk/app/webrtc/test/fakeaudiocapturemodule_unittest.cc
+++ b/webrtc/api/test/fakeaudiocapturemodule_unittest.cc
@@ -25,7 +25,7 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/test/fakeaudiocapturemodule.h"
+#include "webrtc/api/test/fakeaudiocapturemodule.h"
 
 #include <algorithm>
 
diff --git a/talk/app/webrtc/test/fakeconstraints.h b/webrtc/api/test/fakeconstraints.h
similarity index 94%
rename from talk/app/webrtc/test/fakeconstraints.h
rename to webrtc/api/test/fakeconstraints.h
index 8673d85..155e5ea 100644
--- a/talk/app/webrtc/test/fakeconstraints.h
+++ b/webrtc/api/test/fakeconstraints.h
@@ -25,13 +25,13 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_TEST_FAKECONSTRAINTS_H_
-#define TALK_APP_WEBRTC_TEST_FAKECONSTRAINTS_H_
+#ifndef WEBRTC_API_TEST_FAKECONSTRAINTS_H_
+#define WEBRTC_API_TEST_FAKECONSTRAINTS_H_
 
 #include <string>
 #include <vector>
 
-#include "talk/app/webrtc/mediaconstraintsinterface.h"
+#include "webrtc/api/mediaconstraintsinterface.h"
 #include "webrtc/base/stringencode.h"
 
 namespace webrtc {
@@ -130,4 +130,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_TEST_FAKECONSTRAINTS_H_
+#endif  // WEBRTC_API_TEST_FAKECONSTRAINTS_H_
diff --git a/talk/app/webrtc/test/fakedatachannelprovider.h b/webrtc/api/test/fakedatachannelprovider.h
similarity index 95%
rename from talk/app/webrtc/test/fakedatachannelprovider.h
rename to webrtc/api/test/fakedatachannelprovider.h
index ff44e58..32c2b52 100644
--- a/talk/app/webrtc/test/fakedatachannelprovider.h
+++ b/webrtc/api/test/fakedatachannelprovider.h
@@ -25,10 +25,10 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_TEST_FAKEDATACHANNELPROVIDER_H_
-#define TALK_APP_WEBRTC_TEST_FAKEDATACHANNELPROVIDER_H_
+#ifndef WEBRTC_API_TEST_FAKEDATACHANNELPROVIDER_H_
+#define WEBRTC_API_TEST_FAKEDATACHANNELPROVIDER_H_
 
-#include "talk/app/webrtc/datachannel.h"
+#include "webrtc/api/datachannel.h"
 
 class FakeDataChannelProvider : public webrtc::DataChannelProviderInterface {
  public:
@@ -158,4 +158,4 @@
   std::set<uint32_t> send_ssrcs_;
   std::set<uint32_t> recv_ssrcs_;
 };
-#endif  // TALK_APP_WEBRTC_TEST_FAKEDATACHANNELPROVIDER_H_
+#endif  // WEBRTC_API_TEST_FAKEDATACHANNELPROVIDER_H_
diff --git a/talk/app/webrtc/test/fakedtlsidentitystore.h b/webrtc/api/test/fakedtlsidentitystore.h
similarity index 96%
rename from talk/app/webrtc/test/fakedtlsidentitystore.h
rename to webrtc/api/test/fakedtlsidentitystore.h
index 98074c7..404e2ae 100644
--- a/talk/app/webrtc/test/fakedtlsidentitystore.h
+++ b/webrtc/api/test/fakedtlsidentitystore.h
@@ -25,14 +25,14 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_TEST_FAKEDTLSIDENTITYSERVICE_H_
-#define TALK_APP_WEBRTC_TEST_FAKEDTLSIDENTITYSERVICE_H_
+#ifndef WEBRTC_API_TEST_FAKEDTLSIDENTITYSERVICE_H_
+#define WEBRTC_API_TEST_FAKEDTLSIDENTITYSERVICE_H_
 
 #include <string>
 #include <utility>
 
-#include "talk/app/webrtc/dtlsidentitystore.h"
-#include "talk/app/webrtc/peerconnectioninterface.h"
+#include "webrtc/api/dtlsidentitystore.h"
+#include "webrtc/api/peerconnectioninterface.h"
 #include "webrtc/base/rtccertificate.h"
 
 static const struct {
@@ -181,4 +181,4 @@
   int key_index_ = 0;
 };
 
-#endif  // TALK_APP_WEBRTC_TEST_FAKEDTLSIDENTITYSERVICE_H_
+#endif  // WEBRTC_API_TEST_FAKEDTLSIDENTITYSERVICE_H_
diff --git a/talk/app/webrtc/test/fakeperiodicvideocapturer.h b/webrtc/api/test/fakeperiodicvideocapturer.h
similarity index 94%
rename from talk/app/webrtc/test/fakeperiodicvideocapturer.h
rename to webrtc/api/test/fakeperiodicvideocapturer.h
index 7e6863c..2ce648e 100644
--- a/talk/app/webrtc/test/fakeperiodicvideocapturer.h
+++ b/webrtc/api/test/fakeperiodicvideocapturer.h
@@ -28,8 +28,8 @@
 // FakePeriodicVideoCapturer implements a fake cricket::VideoCapturer that
 // creates video frames periodically after it has been started.
 
-#ifndef TALK_APP_WEBRTC_TEST_FAKEPERIODICVIDEOCAPTURER_H_
-#define TALK_APP_WEBRTC_TEST_FAKEPERIODICVIDEOCAPTURER_H_
+#ifndef WEBRTC_API_TEST_FAKEPERIODICVIDEOCAPTURER_H_
+#define WEBRTC_API_TEST_FAKEPERIODICVIDEOCAPTURER_H_
 
 #include "webrtc/base/thread.h"
 #include "webrtc/media/base/fakevideocapturer.h"
@@ -86,4 +86,4 @@
 
 }  // namespace webrtc
 
-#endif  //  TALK_APP_WEBRTC_TEST_FAKEPERIODICVIDEOCAPTURER_H_
+#endif  //  WEBRTC_API_TEST_FAKEPERIODICVIDEOCAPTURER_H_
diff --git a/talk/app/webrtc/test/fakevideotrackrenderer.h b/webrtc/api/test/fakevideotrackrenderer.h
similarity index 92%
rename from talk/app/webrtc/test/fakevideotrackrenderer.h
rename to webrtc/api/test/fakevideotrackrenderer.h
index 97e7eea..4a7477b 100644
--- a/talk/app/webrtc/test/fakevideotrackrenderer.h
+++ b/webrtc/api/test/fakevideotrackrenderer.h
@@ -25,10 +25,10 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_TEST_FAKEVIDEOTRACKRENDERER_H_
-#define TALK_APP_WEBRTC_TEST_FAKEVIDEOTRACKRENDERER_H_
+#ifndef WEBRTC_API_TEST_FAKEVIDEOTRACKRENDERER_H_
+#define WEBRTC_API_TEST_FAKEVIDEOTRACKRENDERER_H_
 
-#include "talk/app/webrtc/mediastreaminterface.h"
+#include "webrtc/api/mediastreaminterface.h"
 #include "webrtc/media/base/fakevideorenderer.h"
 
 namespace webrtc {
@@ -68,4 +68,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_TEST_FAKEVIDEOTRACKRENDERER_H_
+#endif  // WEBRTC_API_TEST_FAKEVIDEOTRACKRENDERER_H_
diff --git a/talk/app/webrtc/test/mockpeerconnectionobservers.h b/webrtc/api/test/mockpeerconnectionobservers.h
similarity index 96%
rename from talk/app/webrtc/test/mockpeerconnectionobservers.h
rename to webrtc/api/test/mockpeerconnectionobservers.h
index f1bdbee..bae8538 100644
--- a/talk/app/webrtc/test/mockpeerconnectionobservers.h
+++ b/webrtc/api/test/mockpeerconnectionobservers.h
@@ -27,12 +27,12 @@
 
 // This file contains mock implementations of observers used in PeerConnection.
 
-#ifndef TALK_APP_WEBRTC_TEST_MOCKPEERCONNECTIONOBSERVERS_H_
-#define TALK_APP_WEBRTC_TEST_MOCKPEERCONNECTIONOBSERVERS_H_
+#ifndef WEBRTC_API_TEST_MOCKPEERCONNECTIONOBSERVERS_H_
+#define WEBRTC_API_TEST_MOCKPEERCONNECTIONOBSERVERS_H_
 
 #include <string>
 
-#include "talk/app/webrtc/datachannelinterface.h"
+#include "webrtc/api/datachannelinterface.h"
 
 namespace webrtc {
 
@@ -240,4 +240,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_TEST_MOCKPEERCONNECTIONOBSERVERS_H_
+#endif  // WEBRTC_API_TEST_MOCKPEERCONNECTIONOBSERVERS_H_
diff --git a/talk/app/webrtc/test/peerconnectiontestwrapper.cc b/webrtc/api/test/peerconnectiontestwrapper.cc
similarity index 97%
rename from talk/app/webrtc/test/peerconnectiontestwrapper.cc
rename to webrtc/api/test/peerconnectiontestwrapper.cc
index 86b7842..7f9ab59 100644
--- a/talk/app/webrtc/test/peerconnectiontestwrapper.cc
+++ b/webrtc/api/test/peerconnectiontestwrapper.cc
@@ -27,11 +27,11 @@
 
 #include <utility>
 
-#include "talk/app/webrtc/test/fakedtlsidentitystore.h"
-#include "talk/app/webrtc/test/fakeperiodicvideocapturer.h"
-#include "talk/app/webrtc/test/mockpeerconnectionobservers.h"
-#include "talk/app/webrtc/test/peerconnectiontestwrapper.h"
-#include "talk/app/webrtc/videosourceinterface.h"
+#include "webrtc/api/test/fakedtlsidentitystore.h"
+#include "webrtc/api/test/fakeperiodicvideocapturer.h"
+#include "webrtc/api/test/mockpeerconnectionobservers.h"
+#include "webrtc/api/test/peerconnectiontestwrapper.h"
+#include "webrtc/api/videosourceinterface.h"
 #include "webrtc/base/gunit.h"
 #include "webrtc/p2p/client/fakeportallocator.h"
 
diff --git a/talk/app/webrtc/test/peerconnectiontestwrapper.h b/webrtc/api/test/peerconnectiontestwrapper.h
similarity index 92%
rename from talk/app/webrtc/test/peerconnectiontestwrapper.h
rename to webrtc/api/test/peerconnectiontestwrapper.h
index 883f2f2..f4600ea 100644
--- a/talk/app/webrtc/test/peerconnectiontestwrapper.h
+++ b/webrtc/api/test/peerconnectiontestwrapper.h
@@ -25,13 +25,13 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_TEST_PEERCONNECTIONTESTWRAPPER_H_
-#define TALK_APP_WEBRTC_TEST_PEERCONNECTIONTESTWRAPPER_H_
+#ifndef WEBRTC_API_TEST_PEERCONNECTIONTESTWRAPPER_H_
+#define WEBRTC_API_TEST_PEERCONNECTIONTESTWRAPPER_H_
 
-#include "talk/app/webrtc/peerconnectioninterface.h"
-#include "talk/app/webrtc/test/fakeaudiocapturemodule.h"
-#include "talk/app/webrtc/test/fakeconstraints.h"
-#include "talk/app/webrtc/test/fakevideotrackrenderer.h"
+#include "webrtc/api/peerconnectioninterface.h"
+#include "webrtc/api/test/fakeaudiocapturemodule.h"
+#include "webrtc/api/test/fakeconstraints.h"
+#include "webrtc/api/test/fakevideotrackrenderer.h"
 #include "webrtc/base/sigslot.h"
 
 class PeerConnectionTestWrapper
@@ -112,4 +112,4 @@
   rtc::scoped_ptr<webrtc::FakeVideoTrackRenderer> renderer_;
 };
 
-#endif  // TALK_APP_WEBRTC_TEST_PEERCONNECTIONTESTWRAPPER_H_
+#endif  // WEBRTC_API_TEST_PEERCONNECTIONTESTWRAPPER_H_
diff --git a/talk/app/webrtc/test/testsdpstrings.h b/webrtc/api/test/testsdpstrings.h
similarity index 97%
rename from talk/app/webrtc/test/testsdpstrings.h
rename to webrtc/api/test/testsdpstrings.h
index e27c9a2..d806e71 100644
--- a/talk/app/webrtc/test/testsdpstrings.h
+++ b/webrtc/api/test/testsdpstrings.h
@@ -27,8 +27,8 @@
 
 // This file contain SDP strings used for testing.
 
-#ifndef TALK_APP_WEBRTC_TEST_TESTSDPSTRINGS_H_
-#define TALK_APP_WEBRTC_TEST_TESTSDPSTRINGS_H_
+#ifndef WEBRTC_API_TEST_TESTSDPSTRINGS_H_
+#define WEBRTC_API_TEST_TESTSDPSTRINGS_H_
 
 namespace webrtc {
 
@@ -144,4 +144,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_TEST_TESTSDPSTRINGS_H_
+#endif  // WEBRTC_API_TEST_TESTSDPSTRINGS_H_
diff --git a/talk/app/webrtc/umametrics.h b/webrtc/api/umametrics.h
similarity index 97%
rename from talk/app/webrtc/umametrics.h
rename to webrtc/api/umametrics.h
index 14fac96..f72ad3b 100644
--- a/talk/app/webrtc/umametrics.h
+++ b/webrtc/api/umametrics.h
@@ -27,8 +27,8 @@
 
 // This file contains enums related to IPv4/IPv6 metrics.
 
-#ifndef TALK_APP_WEBRTC_UMAMETRICS_H_
-#define TALK_APP_WEBRTC_UMAMETRICS_H_
+#ifndef WEBRTC_API_UMAMETRICS_H_
+#define WEBRTC_API_UMAMETRICS_H_
 
 namespace webrtc {
 
@@ -125,4 +125,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_UMAMETRICS_H_
+#endif  // WEBRTC_API_UMAMETRICS_H_
diff --git a/talk/app/webrtc/videosource.cc b/webrtc/api/videosource.cc
similarity index 98%
rename from talk/app/webrtc/videosource.cc
rename to webrtc/api/videosource.cc
index 08c9717..a94c937 100644
--- a/talk/app/webrtc/videosource.cc
+++ b/webrtc/api/videosource.cc
@@ -25,12 +25,12 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/videosource.h"
+#include "webrtc/api/videosource.h"
 
 #include <cstdlib>
 #include <vector>
 
-#include "talk/app/webrtc/mediaconstraintsinterface.h"
+#include "webrtc/api/mediaconstraintsinterface.h"
 #include "talk/session/media/channelmanager.h"
 #include "webrtc/base/arraysize.h"
 
diff --git a/talk/app/webrtc/videosource.h b/webrtc/api/videosource.h
similarity index 92%
rename from talk/app/webrtc/videosource.h
rename to webrtc/api/videosource.h
index bae5d30..262bc44 100644
--- a/talk/app/webrtc/videosource.h
+++ b/webrtc/api/videosource.h
@@ -25,15 +25,15 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_VIDEOSOURCE_H_
-#define TALK_APP_WEBRTC_VIDEOSOURCE_H_
+#ifndef WEBRTC_API_VIDEOSOURCE_H_
+#define WEBRTC_API_VIDEOSOURCE_H_
 
 #include <list>
 
-#include "talk/app/webrtc/mediastreaminterface.h"
-#include "talk/app/webrtc/notifier.h"
-#include "talk/app/webrtc/videosourceinterface.h"
-#include "talk/app/webrtc/videotrackrenderers.h"
+#include "webrtc/api/mediastreaminterface.h"
+#include "webrtc/api/notifier.h"
+#include "webrtc/api/videosourceinterface.h"
+#include "webrtc/api/videotrackrenderers.h"
 #include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/sigslot.h"
 #include "webrtc/media/base/videosinkinterface.h"
@@ -113,4 +113,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_VIDEOSOURCE_H_
+#endif  // WEBRTC_API_VIDEOSOURCE_H_
diff --git a/talk/app/webrtc/videosource_unittest.cc b/webrtc/api/videosource_unittest.cc
similarity index 98%
rename from talk/app/webrtc/videosource_unittest.cc
rename to webrtc/api/videosource_unittest.cc
index bb91127..26543ad 100644
--- a/talk/app/webrtc/videosource_unittest.cc
+++ b/webrtc/api/videosource_unittest.cc
@@ -28,10 +28,10 @@
 #include <string>
 #include <vector>
 
-#include "talk/app/webrtc/remotevideocapturer.h"
-#include "talk/app/webrtc/test/fakeconstraints.h"
-#include "talk/app/webrtc/videosource.h"
 #include "talk/session/media/channelmanager.h"
+#include "webrtc/api/remotevideocapturer.h"
+#include "webrtc/api/test/fakeconstraints.h"
+#include "webrtc/api/videosource.h"
 #include "webrtc/base/gunit.h"
 #include "webrtc/media/base/fakemediaengine.h"
 #include "webrtc/media/base/fakevideocapturer.h"
diff --git a/talk/app/webrtc/videosourceinterface.h b/webrtc/api/videosourceinterface.h
similarity index 92%
rename from talk/app/webrtc/videosourceinterface.h
rename to webrtc/api/videosourceinterface.h
index d74bf3b..5491576 100644
--- a/talk/app/webrtc/videosourceinterface.h
+++ b/webrtc/api/videosourceinterface.h
@@ -25,10 +25,10 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_VIDEOSOURCEINTERFACE_H_
-#define TALK_APP_WEBRTC_VIDEOSOURCEINTERFACE_H_
+#ifndef WEBRTC_API_VIDEOSOURCEINTERFACE_H_
+#define WEBRTC_API_VIDEOSOURCEINTERFACE_H_
 
-#include "talk/app/webrtc/mediastreaminterface.h"
+#include "webrtc/api/mediastreaminterface.h"
 #include "webrtc/media/base/mediachannel.h"
 #include "webrtc/media/base/videorenderer.h"
 
@@ -65,4 +65,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_VIDEOSOURCEINTERFACE_H_
+#endif  // WEBRTC_API_VIDEOSOURCEINTERFACE_H_
diff --git a/talk/app/webrtc/videosourceproxy.h b/webrtc/api/videosourceproxy.h
similarity index 90%
rename from talk/app/webrtc/videosourceproxy.h
rename to webrtc/api/videosourceproxy.h
index 01abaf6..99a3b1e 100644
--- a/talk/app/webrtc/videosourceproxy.h
+++ b/webrtc/api/videosourceproxy.h
@@ -25,11 +25,11 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_VIDEOSOURCEPROXY_H_
-#define TALK_APP_WEBRTC_VIDEOSOURCEPROXY_H_
+#ifndef WEBRTC_API_VIDEOSOURCEPROXY_H_
+#define WEBRTC_API_VIDEOSOURCEPROXY_H_
 
-#include "talk/app/webrtc/proxy.h"
-#include "talk/app/webrtc/videosourceinterface.h"
+#include "webrtc/api/proxy.h"
+#include "webrtc/api/videosourceinterface.h"
 
 namespace webrtc {
 
@@ -51,4 +51,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_VIDEOSOURCEPROXY_H_
+#endif  // WEBRTC_API_VIDEOSOURCEPROXY_H_
diff --git a/talk/app/webrtc/videotrack.cc b/webrtc/api/videotrack.cc
similarity index 98%
rename from talk/app/webrtc/videotrack.cc
rename to webrtc/api/videotrack.cc
index c649275..4c87c39 100644
--- a/talk/app/webrtc/videotrack.cc
+++ b/webrtc/api/videotrack.cc
@@ -25,7 +25,7 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/videotrack.h"
+#include "webrtc/api/videotrack.h"
 
 #include <string>
 
diff --git a/talk/app/webrtc/videotrack.h b/webrtc/api/videotrack.h
similarity index 89%
rename from talk/app/webrtc/videotrack.h
rename to webrtc/api/videotrack.h
index b321c42..399e513 100644
--- a/talk/app/webrtc/videotrack.h
+++ b/webrtc/api/videotrack.h
@@ -25,14 +25,14 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_VIDEOTRACK_H_
-#define TALK_APP_WEBRTC_VIDEOTRACK_H_
+#ifndef WEBRTC_API_VIDEOTRACK_H_
+#define WEBRTC_API_VIDEOTRACK_H_
 
 #include <string>
 
-#include "talk/app/webrtc/mediastreamtrack.h"
-#include "talk/app/webrtc/videosourceinterface.h"
-#include "talk/app/webrtc/videotrackrenderers.h"
+#include "webrtc/api/mediastreamtrack.h"
+#include "webrtc/api/videosourceinterface.h"
+#include "webrtc/api/videotrackrenderers.h"
 #include "webrtc/base/scoped_ref_ptr.h"
 
 namespace webrtc {
@@ -62,4 +62,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_VIDEOTRACK_H_
+#endif  // WEBRTC_API_VIDEOTRACK_H_
diff --git a/talk/app/webrtc/videotrack_unittest.cc b/webrtc/api/videotrack_unittest.cc
similarity index 95%
rename from talk/app/webrtc/videotrack_unittest.cc
rename to webrtc/api/videotrack_unittest.cc
index 88552a5..717cba6 100644
--- a/talk/app/webrtc/videotrack_unittest.cc
+++ b/webrtc/api/videotrack_unittest.cc
@@ -27,11 +27,11 @@
 
 #include <string>
 
-#include "talk/app/webrtc/remotevideocapturer.h"
-#include "talk/app/webrtc/test/fakevideotrackrenderer.h"
-#include "talk/app/webrtc/videosource.h"
-#include "talk/app/webrtc/videotrack.h"
 #include "talk/session/media/channelmanager.h"
+#include "webrtc/api/remotevideocapturer.h"
+#include "webrtc/api/test/fakevideotrackrenderer.h"
+#include "webrtc/api/videosource.h"
+#include "webrtc/api/videotrack.h"
 #include "webrtc/base/gunit.h"
 #include "webrtc/base/scoped_ptr.h"
 #include "webrtc/media/base/fakemediaengine.h"
diff --git a/talk/app/webrtc/videotrackrenderers.cc b/webrtc/api/videotrackrenderers.cc
similarity index 98%
rename from talk/app/webrtc/videotrackrenderers.cc
rename to webrtc/api/videotrackrenderers.cc
index 81f6530..83615d4 100644
--- a/talk/app/webrtc/videotrackrenderers.cc
+++ b/webrtc/api/videotrackrenderers.cc
@@ -25,7 +25,7 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/videotrackrenderers.h"
+#include "webrtc/api/videotrackrenderers.h"
 #include "webrtc/media/webrtc/webrtcvideoframe.h"
 
 namespace webrtc {
diff --git a/talk/app/webrtc/videotrackrenderers.h b/webrtc/api/videotrackrenderers.h
similarity index 92%
rename from talk/app/webrtc/videotrackrenderers.h
rename to webrtc/api/videotrackrenderers.h
index f66f8db..1ce5afa 100644
--- a/talk/app/webrtc/videotrackrenderers.h
+++ b/webrtc/api/videotrackrenderers.h
@@ -25,12 +25,12 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_VIDEOTRACKRENDERERS_H_
-#define TALK_APP_WEBRTC_VIDEOTRACKRENDERERS_H_
+#ifndef WEBRTC_API_VIDEOTRACKRENDERERS_H_
+#define WEBRTC_API_VIDEOTRACKRENDERERS_H_
 
 #include <set>
 
-#include "talk/app/webrtc/mediastreaminterface.h"
+#include "webrtc/api/mediastreaminterface.h"
 #include "webrtc/base/criticalsection.h"
 #include "webrtc/base/scoped_ptr.h"
 #include "webrtc/media/base/videorenderer.h"
@@ -68,4 +68,4 @@
 
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_VIDEOTRACKRENDERERS_H_
+#endif  // WEBRTC_API_VIDEOTRACKRENDERERS_H_
diff --git a/talk/app/webrtc/webrtcsdp.cc b/webrtc/api/webrtcsdp.cc
similarity index 99%
rename from talk/app/webrtc/webrtcsdp.cc
rename to webrtc/api/webrtcsdp.cc
index 16c0e69..1f06b69 100644
--- a/talk/app/webrtc/webrtcsdp.cc
+++ b/webrtc/api/webrtcsdp.cc
@@ -25,7 +25,7 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/webrtcsdp.h"
+#include "webrtc/api/webrtcsdp.h"
 
 #include <ctype.h>
 #include <limits.h>
@@ -34,9 +34,9 @@
 #include <string>
 #include <vector>
 
-#include "talk/app/webrtc/jsepicecandidate.h"
-#include "talk/app/webrtc/jsepsessiondescription.h"
 #include "talk/session/media/mediasession.h"
+#include "webrtc/api/jsepicecandidate.h"
+#include "webrtc/api/jsepsessiondescription.h"
 #include "webrtc/base/arraysize.h"
 #include "webrtc/base/common.h"
 #include "webrtc/base/logging.h"
diff --git a/talk/app/webrtc/webrtcsdp.h b/webrtc/api/webrtcsdp.h
similarity index 96%
rename from talk/app/webrtc/webrtcsdp.h
rename to webrtc/api/webrtcsdp.h
index fcbbdad..a75f735 100644
--- a/talk/app/webrtc/webrtcsdp.h
+++ b/webrtc/api/webrtcsdp.h
@@ -34,8 +34,8 @@
 // * draft-lennox-mmusic-sdp-source-selection-02 -
 //   Mechanisms for Media Source Selection in SDP
 
-#ifndef TALK_APP_WEBRTC_WEBRTCSDP_H_
-#define TALK_APP_WEBRTC_WEBRTCSDP_H_
+#ifndef WEBRTC_API_WEBRTCSDP_H_
+#define WEBRTC_API_WEBRTCSDP_H_
 
 #include <string>
 
@@ -78,4 +78,4 @@
                              SdpParseError* error);
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_WEBRTCSDP_H_
+#endif  // WEBRTC_API_WEBRTCSDP_H_
diff --git a/talk/app/webrtc/webrtcsdp_unittest.cc b/webrtc/api/webrtcsdp_unittest.cc
similarity index 99%
rename from talk/app/webrtc/webrtcsdp_unittest.cc
rename to webrtc/api/webrtcsdp_unittest.cc
index 3e438ff..24dbd58 100644
--- a/talk/app/webrtc/webrtcsdp_unittest.cc
+++ b/webrtc/api/webrtcsdp_unittest.cc
@@ -29,12 +29,12 @@
 #include <string>
 #include <vector>
 
-#include "talk/app/webrtc/jsepsessiondescription.h"
-#ifdef WEBRTC_ANDROID
-#include "talk/app/webrtc/test/androidtestinitializer.h"
-#endif
-#include "talk/app/webrtc/webrtcsdp.h"
 #include "talk/session/media/mediasession.h"
+#include "webrtc/api/jsepsessiondescription.h"
+#ifdef WEBRTC_ANDROID
+#include "webrtc/api/test/androidtestinitializer.h"
+#endif
+#include "webrtc/api/webrtcsdp.h"
 #include "webrtc/base/gunit.h"
 #include "webrtc/base/logging.h"
 #include "webrtc/base/messagedigest.h"
diff --git a/talk/app/webrtc/webrtcsession.cc b/webrtc/api/webrtcsession.cc
similarity index 99%
rename from talk/app/webrtc/webrtcsession.cc
rename to webrtc/api/webrtcsession.cc
index a848408..15feb53 100644
--- a/talk/app/webrtc/webrtcsession.cc
+++ b/webrtc/api/webrtcsession.cc
@@ -25,7 +25,7 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/webrtcsession.h"
+#include "webrtc/api/webrtcsession.h"
 
 #include <limits.h>
 
@@ -34,15 +34,15 @@
 #include <utility>
 #include <vector>
 
-#include "talk/app/webrtc/jsepicecandidate.h"
-#include "talk/app/webrtc/jsepsessiondescription.h"
-#include "talk/app/webrtc/mediaconstraintsinterface.h"
-#include "talk/app/webrtc/peerconnectioninterface.h"
-#include "talk/app/webrtc/sctputils.h"
-#include "talk/app/webrtc/webrtcsessiondescriptionfactory.h"
 #include "talk/session/media/channel.h"
 #include "talk/session/media/channelmanager.h"
 #include "talk/session/media/mediasession.h"
+#include "webrtc/api/jsepicecandidate.h"
+#include "webrtc/api/jsepsessiondescription.h"
+#include "webrtc/api/mediaconstraintsinterface.h"
+#include "webrtc/api/peerconnectioninterface.h"
+#include "webrtc/api/sctputils.h"
+#include "webrtc/api/webrtcsessiondescriptionfactory.h"
 #include "webrtc/audio/audio_sink.h"
 #include "webrtc/base/basictypes.h"
 #include "webrtc/base/checks.h"
diff --git a/talk/app/webrtc/webrtcsession.h b/webrtc/api/webrtcsession.h
similarity index 97%
rename from talk/app/webrtc/webrtcsession.h
rename to webrtc/api/webrtcsession.h
index 7378736..0632fe2 100644
--- a/talk/app/webrtc/webrtcsession.h
+++ b/webrtc/api/webrtcsession.h
@@ -25,19 +25,19 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_WEBRTCSESSION_H_
-#define TALK_APP_WEBRTC_WEBRTCSESSION_H_
+#ifndef WEBRTC_API_WEBRTCSESSION_H_
+#define WEBRTC_API_WEBRTCSESSION_H_
 
 #include <string>
 #include <vector>
 
-#include "talk/app/webrtc/datachannel.h"
-#include "talk/app/webrtc/dtmfsender.h"
-#include "talk/app/webrtc/mediacontroller.h"
-#include "talk/app/webrtc/mediastreamprovider.h"
-#include "talk/app/webrtc/peerconnectioninterface.h"
-#include "talk/app/webrtc/statstypes.h"
 #include "talk/session/media/mediasession.h"
+#include "webrtc/api/datachannel.h"
+#include "webrtc/api/dtmfsender.h"
+#include "webrtc/api/mediacontroller.h"
+#include "webrtc/api/mediastreamprovider.h"
+#include "webrtc/api/peerconnectioninterface.h"
+#include "webrtc/api/statstypes.h"
 #include "webrtc/base/sigslot.h"
 #include "webrtc/base/sslidentity.h"
 #include "webrtc/base/thread.h"
@@ -519,4 +519,4 @@
 };
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_WEBRTCSESSION_H_
+#endif  // WEBRTC_API_WEBRTCSESSION_H_
diff --git a/talk/app/webrtc/webrtcsession_unittest.cc b/webrtc/api/webrtcsession_unittest.cc
similarity index 99%
rename from talk/app/webrtc/webrtcsession_unittest.cc
rename to webrtc/api/webrtcsession_unittest.cc
index 8d8a782..250e415 100644
--- a/talk/app/webrtc/webrtcsession_unittest.cc
+++ b/webrtc/api/webrtcsession_unittest.cc
@@ -28,22 +28,22 @@
 #include <utility>
 #include <vector>
 
-#include "talk/app/webrtc/audiotrack.h"
-#include "talk/app/webrtc/fakemediacontroller.h"
-#include "talk/app/webrtc/fakemetricsobserver.h"
-#include "talk/app/webrtc/jsepicecandidate.h"
-#include "talk/app/webrtc/jsepsessiondescription.h"
-#include "talk/app/webrtc/peerconnection.h"
-#include "talk/app/webrtc/sctputils.h"
-#include "talk/app/webrtc/streamcollection.h"
-#include "talk/app/webrtc/streamcollection.h"
-#include "talk/app/webrtc/test/fakeconstraints.h"
-#include "talk/app/webrtc/test/fakedtlsidentitystore.h"
-#include "talk/app/webrtc/videotrack.h"
-#include "talk/app/webrtc/webrtcsession.h"
-#include "talk/app/webrtc/webrtcsessiondescriptionfactory.h"
 #include "talk/session/media/channelmanager.h"
 #include "talk/session/media/mediasession.h"
+#include "webrtc/api/audiotrack.h"
+#include "webrtc/api/fakemediacontroller.h"
+#include "webrtc/api/fakemetricsobserver.h"
+#include "webrtc/api/jsepicecandidate.h"
+#include "webrtc/api/jsepsessiondescription.h"
+#include "webrtc/api/peerconnection.h"
+#include "webrtc/api/sctputils.h"
+#include "webrtc/api/streamcollection.h"
+#include "webrtc/api/streamcollection.h"
+#include "webrtc/api/test/fakeconstraints.h"
+#include "webrtc/api/test/fakedtlsidentitystore.h"
+#include "webrtc/api/videotrack.h"
+#include "webrtc/api/webrtcsession.h"
+#include "webrtc/api/webrtcsessiondescriptionfactory.h"
 #include "webrtc/base/fakenetwork.h"
 #include "webrtc/base/firewallsocketserver.h"
 #include "webrtc/base/gunit.h"
diff --git a/talk/app/webrtc/webrtcsessiondescriptionfactory.cc b/webrtc/api/webrtcsessiondescriptionfactory.cc
similarity index 98%
rename from talk/app/webrtc/webrtcsessiondescriptionfactory.cc
rename to webrtc/api/webrtcsessiondescriptionfactory.cc
index f08b77e..4421465 100644
--- a/talk/app/webrtc/webrtcsessiondescriptionfactory.cc
+++ b/webrtc/api/webrtcsessiondescriptionfactory.cc
@@ -25,15 +25,15 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "talk/app/webrtc/webrtcsessiondescriptionfactory.h"
+#include "webrtc/api/webrtcsessiondescriptionfactory.h"
 
 #include <utility>
 
-#include "talk/app/webrtc/dtlsidentitystore.h"
-#include "talk/app/webrtc/jsep.h"
-#include "talk/app/webrtc/jsepsessiondescription.h"
-#include "talk/app/webrtc/mediaconstraintsinterface.h"
-#include "talk/app/webrtc/webrtcsession.h"
+#include "webrtc/api/dtlsidentitystore.h"
+#include "webrtc/api/jsep.h"
+#include "webrtc/api/jsepsessiondescription.h"
+#include "webrtc/api/mediaconstraintsinterface.h"
+#include "webrtc/api/webrtcsession.h"
 #include "webrtc/base/sslidentity.h"
 
 using cricket::MediaSessionOptions;
diff --git a/talk/app/webrtc/webrtcsessiondescriptionfactory.h b/webrtc/api/webrtcsessiondescriptionfactory.h
similarity index 95%
rename from talk/app/webrtc/webrtcsessiondescriptionfactory.h
rename to webrtc/api/webrtcsessiondescriptionfactory.h
index 3281bb5c..7d2cdee 100644
--- a/talk/app/webrtc/webrtcsessiondescriptionfactory.h
+++ b/webrtc/api/webrtcsessiondescriptionfactory.h
@@ -25,12 +25,12 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef TALK_APP_WEBRTC_WEBRTCSESSIONDESCRIPTIONFACTORY_H_
-#define TALK_APP_WEBRTC_WEBRTCSESSIONDESCRIPTIONFACTORY_H_
+#ifndef WEBRTC_API_WEBRTCSESSIONDESCRIPTIONFACTORY_H_
+#define WEBRTC_API_WEBRTCSESSIONDESCRIPTIONFACTORY_H_
 
-#include "talk/app/webrtc/dtlsidentitystore.h"
-#include "talk/app/webrtc/peerconnectioninterface.h"
 #include "talk/session/media/mediasession.h"
+#include "webrtc/api/dtlsidentitystore.h"
+#include "webrtc/api/peerconnectioninterface.h"
 #include "webrtc/base/messagehandler.h"
 #include "webrtc/base/rtccertificate.h"
 #include "webrtc/p2p/base/transportdescriptionfactory.h"
@@ -190,4 +190,4 @@
 };
 }  // namespace webrtc
 
-#endif  // TALK_APP_WEBRTC_WEBRTCSESSIONDESCRIPTIONFACTORY_H_
+#endif  // WEBRTC_API_WEBRTCSESSIONDESCRIPTIONFACTORY_H_
diff --git a/webrtc/build/android/test_runner.py b/webrtc/build/android/test_runner.py
index 3772005..fd8ca2f 100755
--- a/webrtc/build/android/test_runner.py
+++ b/webrtc/build/android/test_runner.py
@@ -39,7 +39,7 @@
     'common_video_unittests':
         'webrtc/common_video/common_video_unittests.isolate',
     'peerconnection_unittests':
-        'talk/peerconnection_unittests.isolate',
+        'webrtc/api/peerconnection_unittests.isolate',
     'modules_tests': 'webrtc/modules/modules_tests.isolate',
     'modules_unittests': 'webrtc/modules/modules_unittests.isolate',
     'rtc_unittests': 'webrtc/rtc_unittests.isolate',
diff --git a/webrtc/build/apk_tests.gyp b/webrtc/build/apk_tests.gyp
index 45cb7b6..f7e9a90 100644
--- a/webrtc/build/apk_tests.gyp
+++ b/webrtc/build/apk_tests.gyp
@@ -68,8 +68,8 @@
         'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)peerconnection_unittests<(SHARED_LIB_SUFFIX)',
       },
       'dependencies': [
-        '<(DEPTH)/talk/libjingle_tests.gyp:peerconnection_unittests',
-        '<(DEPTH)/talk/libjingle.gyp:libjingle_peerconnection_java',
+        '<(webrtc_root)/api/api_tests.gyp:peerconnection_unittests',
+        '<(webrtc_root)/api/api.gyp:libjingle_peerconnection_java',
       ],
       'includes': [
         '../../build/apk_test.gypi',
diff --git a/webrtc/build/common.gypi b/webrtc/build/common.gypi
index 2d81271..6d79aa3 100644
--- a/webrtc/build/common.gypi
+++ b/webrtc/build/common.gypi
@@ -134,6 +134,9 @@
     # Determines whether NEON code will be built.
     'build_with_neon%': 0,
 
+    # Disable this to skip building source requiring GTK.
+    'use_gtk%': 1,
+
     # Enable this to use HW H.264 encoder/decoder on iOS/Mac PeerConnections.
     # Enabling this may break interop with Android clients that support H264.
     'use_objc_h264%': 0,
@@ -193,6 +196,9 @@
         'include_tests%': 1,
         'restrict_webrtc_logging%': 0,
       }],
+      ['OS=="android" or OS=="linux"', {
+        'java_home%': '<!(python -c "import os; dir=os.getenv(\'JAVA_HOME\', \'/usr/lib/jvm/java-7-openjdk-amd64\'); assert os.path.exists(os.path.join(dir, \'include/jni.h\')), \'Point \\$JAVA_HOME or the java_home gyp variable to a directory containing include/jni.h!\'; print dir")',
+      }],
       ['OS=="ios"', {
         'build_libjpeg%': 0,
       }],
diff --git a/webrtc/examples/peerconnection/client/conductor.cc b/webrtc/examples/peerconnection/client/conductor.cc
index 3a40fd9..2facf94 100644
--- a/webrtc/examples/peerconnection/client/conductor.cc
+++ b/webrtc/examples/peerconnection/client/conductor.cc
@@ -13,8 +13,8 @@
 #include <utility>
 #include <vector>
 
-#include "talk/app/webrtc/test/fakeconstraints.h"
-#include "talk/app/webrtc/videosourceinterface.h"
+#include "webrtc/api/videosourceinterface.h"
+#include "webrtc/api/test/fakeconstraints.h"
 #include "webrtc/base/common.h"
 #include "webrtc/base/json.h"
 #include "webrtc/base/logging.h"
diff --git a/webrtc/examples/peerconnection/client/conductor.h b/webrtc/examples/peerconnection/client/conductor.h
index 21d838a..db2f77b 100644
--- a/webrtc/examples/peerconnection/client/conductor.h
+++ b/webrtc/examples/peerconnection/client/conductor.h
@@ -17,8 +17,8 @@
 #include <set>
 #include <string>
 
-#include "talk/app/webrtc/mediastreaminterface.h"
-#include "talk/app/webrtc/peerconnectioninterface.h"
+#include "webrtc/api/mediastreaminterface.h"
+#include "webrtc/api/peerconnectioninterface.h"
 #include "webrtc/examples/peerconnection/client/main_wnd.h"
 #include "webrtc/examples/peerconnection/client/peer_connection_client.h"
 #include "webrtc/base/scoped_ptr.h"
diff --git a/webrtc/examples/peerconnection/client/main_wnd.h b/webrtc/examples/peerconnection/client/main_wnd.h
index 6d39b38..5cf38df 100644
--- a/webrtc/examples/peerconnection/client/main_wnd.h
+++ b/webrtc/examples/peerconnection/client/main_wnd.h
@@ -15,7 +15,7 @@
 #include <map>
 #include <string>
 
-#include "talk/app/webrtc/mediastreaminterface.h"
+#include "webrtc/api/mediastreaminterface.h"
 #include "webrtc/base/win32.h"
 #include "webrtc/examples/peerconnection/client/peer_connection_client.h"
 #include "webrtc/media/base/mediachannel.h"
diff --git a/webrtc/webrtc.gyp b/webrtc/webrtc.gyp
index 974ad92..be91108 100644
--- a/webrtc/webrtc.gyp
+++ b/webrtc/webrtc.gyp
@@ -6,7 +6,35 @@
 # in the file PATENTS.  All contributing project authors may
 # be found in the AUTHORS file in the root of the source tree.
 {
+  'variables': {
+    'webrtc_all_dependencies': [
+      'base/base.gyp:*',
+      'sound/sound.gyp:*',
+      'common.gyp:*',
+      'common_audio/common_audio.gyp:*',
+      'common_video/common_video.gyp:*',
+      'media/media.gyp:*',
+      'modules/modules.gyp:*',
+      'p2p/p2p.gyp:*',
+      'system_wrappers/system_wrappers.gyp:*',
+      'tools/tools.gyp:*',
+      'voice_engine/voice_engine.gyp:*',
+      '<(webrtc_vp8_dir)/vp8.gyp:*',
+      '<(webrtc_vp9_dir)/vp9.gyp:*',
+    ],
+  },
   'conditions': [
+    ['build_with_chromium==0', {
+      # TODO(kjellander): Move this to webrtc_all_dependencies once all of talk/
+      # has been moved to webrtc/. It can't be processed by Chromium since the
+      # reference to buid/java.gypi is using an absolute path (and includes
+      # entries cannot contain variables).
+      'variables': {
+        'webrtc_all_dependencies': [
+          'api/api.gyp:*',
+        ],
+      },
+    }],
     ['include_tests==1', {
       'includes': [
         'libjingle/xmllite/xmllite_tests.gypi',
@@ -54,23 +82,6 @@
     'call/webrtc_call.gypi',
     'video/webrtc_video.gypi',
   ],
-  'variables': {
-    'webrtc_all_dependencies': [
-      'base/base.gyp:*',
-      'sound/sound.gyp:*',
-      'common.gyp:*',
-      'common_audio/common_audio.gyp:*',
-      'common_video/common_video.gyp:*',
-      'media/media.gyp:*',
-      'modules/modules.gyp:*',
-      'p2p/p2p.gyp:*',
-      'system_wrappers/system_wrappers.gyp:*',
-      'tools/tools.gyp:*',
-      'voice_engine/voice_engine.gyp:*',
-      '<(webrtc_vp8_dir)/vp8.gyp:*',
-      '<(webrtc_vp9_dir)/vp9.gyp:*',
-    ],
-  },
   'targets': [
     {
       'target_name': 'webrtc_all',
@@ -82,6 +93,7 @@
       'conditions': [
         ['include_tests==1', {
           'dependencies': [
+            'api/api_tests.gyp:*',
             'common_video/common_video_unittests.gyp:*',
             'rtc_unittests',
             'system_wrappers/system_wrappers_tests.gyp:*',
@@ -91,14 +103,6 @@
             'webrtc_tests',
           ],
         }],
-        ['OS=="ios"', {
-          'dependencies': [
-            # TODO(tkchin): Move this target to webrtc_all_dependencies once it
-            # has more than iOS specific targets.
-            # TODO(tkchin): Figure out where to add this in BUILD.gn.
-            'api/api.gyp:*',
-          ],
-        }],
       ],
     },
     {
diff --git a/webrtc/webrtc_examples.gyp b/webrtc/webrtc_examples.gyp
index fd39b03..51cd792 100755
--- a/webrtc/webrtc_examples.gyp
+++ b/webrtc/webrtc_examples.gyp
@@ -78,7 +78,7 @@
             'examples/peerconnection/client/peer_connection_client.h',
           ],
           'dependencies': [
-            '../talk/libjingle.gyp:libjingle_peerconnection',
+            'api/api.gyp:libjingle_peerconnection',
             '<(webrtc_root)/system_wrappers/system_wrappers.gyp:field_trial_default',
           ],
           'conditions': [
@@ -364,7 +364,7 @@
           'target_name': 'AppRTCDemo',
           'type': 'none',
           'dependencies': [
-            '../talk/libjingle.gyp:libjingle_peerconnection_java',
+            'api/api.gyp:libjingle_peerconnection_java',
           ],
           'variables': {
             'apk_name': 'AppRTCDemo',