GN: Add BUILD.gn files + kjellander to OWNERS

This should work as a foundation for all the work that is
left to do to make the parts of WebRTC that Chromium uses
to build with GN.

I implemented some the smaller modules myself in this CL.
The remaining work (TODO's in the .gn files) will be distributed
to various team members.

I'm adding myself to OWNERS files for BUILD.gn files in all the
directories where I'm adding a BUILD.gn file.

BUG=3441
TEST=
Successful compilation of WebRTC as standalone:
gn gen out/Default --args="build_with_chromium=false" && ninja -C out/Default
gn gen out/Default --args="build_with_chromium=false is_clang=true clang_use_chrome_plugins=false" && ninja -C out/Default

I built successfully from a Chromium checkout (with
https://codereview.chromium.org/321313006/ applied) using:
gn gen out/Default && ninja -C out/Default webrtc

R=brettw@chromium.org, niklas.enbom@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/13749004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6523 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/OWNERS b/OWNERS
index e974cfc..ac9c857 100644
--- a/OWNERS
+++ b/OWNERS
@@ -6,6 +6,7 @@
 tommi@webrtc.org

 per-file .gitignore=*

 per-file AUTHORS=*

+per-file BUILD.gn=kjellander@webrtc.org

 per-file DEPS=*

 per-file WATCHLISTS=*

 per-file webrtc_examples.gyp=*

diff --git a/webrtc/BUILD.gn b/webrtc/BUILD.gn
index 1182643..1e8c328 100644
--- a/webrtc/BUILD.gn
+++ b/webrtc/BUILD.gn
@@ -168,8 +168,42 @@
 }
 
 static_library("webrtc") {
+  sources = [
+    "call.h",
+    "config.h",
+    "experiments.h",
+    "frame_callback.h",
+    "transport.h",
+  ]
+
   deps = [
+    ":webrtc_common",
     "base:webrtc_base",
+    "common_audio",
+    "common_video",
+    "modules/audio_coding",
+    "modules/audio_conference_mixer",
+    "modules/audio_device",
+    "modules/audio_processing",
+    "modules/bitrate_controller",
+    "modules/desktop_capture",
+    "modules/media_file",
+    "modules/rtp_rtcp",
+    "modules/utility",
+    "modules/video_capture",
+    "modules/video_coding",
+    "modules/video_processing",
+    "modules/video_render",
     "system_wrappers",
+    "video",
+    "video_engine",
+    "voice_engine",
+  ]
+}
+
+source_set("webrtc_common") {
+  sources = [
+    "config.h",
+    "config.cc",
   ]
 }
diff --git a/webrtc/OWNERS b/webrtc/OWNERS
index bbffda7..b806e21 100644
--- a/webrtc/OWNERS
+++ b/webrtc/OWNERS
@@ -4,3 +4,5 @@
 # structural changes, please get a review from a reviewer in this file.
 per-file *.gyp=*
 per-file *.gypi=*
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/webrtc/base/OWNERS b/webrtc/base/OWNERS
index 4091a93..d292dfd 100644
--- a/webrtc/base/OWNERS
+++ b/webrtc/base/OWNERS
@@ -4,4 +4,6 @@
 henrika@webrtc.org
 henrikg@webrtc.org
 mflodman@webrtc.org
-niklas.enbom@webrtc.org
\ No newline at end of file
+niklas.enbom@webrtc.org
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/webrtc/common_audio/BUILD.gn b/webrtc/common_audio/BUILD.gn
new file mode 100644
index 0000000..4dcc322
--- /dev/null
+++ b/webrtc/common_audio/BUILD.gn
@@ -0,0 +1,26 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# 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.
+
+import("//build/config/arm.gni")
+import("../build/webrtc.gni")
+
+source_set("common_audio") {
+  # TODO(andrew): Implement.
+}
+
+if (cpu_arch == "x86" || cpu_arch == "x64") {
+  source_set("common_audio_sse2") {
+    # TODO(andrew): Implement.
+  }
+}
+
+if (cpu_arch == "arm" && arm_version == 7) {
+  source_set("common_audio_neon") {
+    # TODO(andrew): Implement.
+  }
+}
diff --git a/webrtc/common_audio/OWNERS b/webrtc/common_audio/OWNERS
index 83d774b..98ec472 100644
--- a/webrtc/common_audio/OWNERS
+++ b/webrtc/common_audio/OWNERS
@@ -9,3 +9,5 @@
 # structural changes, please get a review from a reviewer in this file.
 per-file *.gyp=*
 per-file *.gypi=*
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/webrtc/common_video/BUILD.gn b/webrtc/common_video/BUILD.gn
new file mode 100644
index 0000000..2e877e6
--- /dev/null
+++ b/webrtc/common_video/BUILD.gn
@@ -0,0 +1,13 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# 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.
+
+import("../build/webrtc.gni")
+
+source_set("common_video") {
+  # TODO(pbos): Implement.
+}
diff --git a/webrtc/common_video/OWNERS b/webrtc/common_video/OWNERS
index 0c328fa..ed9ac54 100644
--- a/webrtc/common_video/OWNERS
+++ b/webrtc/common_video/OWNERS
@@ -9,3 +9,5 @@
 # structural changes, please get a review from a reviewer in this file.
 per-file *.gyp=*
 per-file *.gypi=*
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/webrtc/modules/audio_coding/BUILD.gn b/webrtc/modules/audio_coding/BUILD.gn
new file mode 100644
index 0000000..e4ad4cb
--- /dev/null
+++ b/webrtc/modules/audio_coding/BUILD.gn
@@ -0,0 +1,13 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# 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.
+
+import("../../build/webrtc.gni")
+
+source_set("audio_coding") {
+  # TODO(andrew): Implement.
+}
diff --git a/webrtc/modules/audio_coding/OWNERS b/webrtc/modules/audio_coding/OWNERS
new file mode 100644
index 0000000..d5ae847
--- /dev/null
+++ b/webrtc/modules/audio_coding/OWNERS
@@ -0,0 +1 @@
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/webrtc/modules/audio_conference_mixer/BUILD.gn b/webrtc/modules/audio_conference_mixer/BUILD.gn
new file mode 100644
index 0000000..a27bb84
--- /dev/null
+++ b/webrtc/modules/audio_conference_mixer/BUILD.gn
@@ -0,0 +1,41 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# 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.
+
+config("internal_config") {
+  visibility = ":*"  # Only targets in this file can depend on this.
+  include_dirs = [
+    "interface",
+    "../interface",
+  ]
+}
+
+source_set("audio_conference_mixer") {
+  sources = [
+    "interface/audio_conference_mixer.h",
+    "interface/audio_conference_mixer_defines.h",
+    "source/audio_conference_mixer_impl.cc",
+    "source/audio_conference_mixer_impl.h",
+    "source/audio_frame_manipulator.cc",
+    "source/audio_frame_manipulator.h",
+    "source/level_indicator.cc",
+    "source/level_indicator.h",
+    "source/memory_pool.h",
+    "source/memory_pool_posix.h",
+    "source/memory_pool_win.h",
+    "source/time_scheduler.cc",
+    "source/time_scheduler.h",
+  ]
+
+  direct_dependent_configs = [ ":internal_config" ]
+
+  deps = [
+    "../../system_wrappers",
+    "../audio_processing",
+    "../utility",
+  ]
+}
diff --git a/webrtc/modules/audio_conference_mixer/OWNERS b/webrtc/modules/audio_conference_mixer/OWNERS
index 7dc791e..7d4cc61 100644
--- a/webrtc/modules/audio_conference_mixer/OWNERS
+++ b/webrtc/modules/audio_conference_mixer/OWNERS
@@ -1,3 +1,5 @@
 henrike@webrtc.org
 pwestin@webrtc.org
-andrew@webrtc.org
\ No newline at end of file
+andrew@webrtc.org
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/webrtc/modules/audio_device/BUILD.gn b/webrtc/modules/audio_device/BUILD.gn
new file mode 100644
index 0000000..d6481ad
--- /dev/null
+++ b/webrtc/modules/audio_device/BUILD.gn
@@ -0,0 +1,13 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# 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.
+
+import("../../build/webrtc.gni")
+
+source_set("audio_device") {
+  # TODO(henrike): Implement.
+}
diff --git a/webrtc/modules/audio_device/OWNERS b/webrtc/modules/audio_device/OWNERS
index 7bb3cd5..1fe4594 100644
--- a/webrtc/modules/audio_device/OWNERS
+++ b/webrtc/modules/audio_device/OWNERS
@@ -9,3 +9,5 @@
 # structural changes, please get a review from a reviewer in this file.
 per-file *.gyp=*
 per-file *.gypi=*
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/webrtc/modules/audio_processing/BUILD.gn b/webrtc/modules/audio_processing/BUILD.gn
new file mode 100644
index 0000000..a727d54
--- /dev/null
+++ b/webrtc/modules/audio_processing/BUILD.gn
@@ -0,0 +1,13 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# 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.
+
+import("../../build/webrtc.gni")
+
+source_set("audio_processing") {
+  # TODO(andrew): Implement.
+}
diff --git a/webrtc/modules/audio_processing/OWNERS b/webrtc/modules/audio_processing/OWNERS
index 7c1f788..41a82af 100644
--- a/webrtc/modules/audio_processing/OWNERS
+++ b/webrtc/modules/audio_processing/OWNERS
@@ -6,3 +6,5 @@
 # structural changes, please get a review from a reviewer in this file.
 per-file *.gyp=*
 per-file *.gypi=*
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/webrtc/modules/bitrate_controller/BUILD.gn b/webrtc/modules/bitrate_controller/BUILD.gn
new file mode 100644
index 0000000..c3ac28c
--- /dev/null
+++ b/webrtc/modules/bitrate_controller/BUILD.gn
@@ -0,0 +1,28 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# 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.
+
+import("../../build/webrtc.gni")
+
+source_set("bitrate_controller") {
+  sources = [
+    "bitrate_controller_impl.cc",
+    "bitrate_controller_impl.h",
+    "include/bitrate_controller.h",
+    "send_side_bandwidth_estimation.cc",
+    "send_side_bandwidth_estimation.h",
+  ]
+
+  if (is_win) {
+    cflags = [
+      # TODO(jschuh): Bug 1348: fix this warning.
+      "/wd4267"  # size_t to int truncations
+    ]
+  }
+
+  deps = [ "../../system_wrappers" ]
+}
diff --git a/webrtc/modules/bitrate_controller/OWNERS b/webrtc/modules/bitrate_controller/OWNERS
index cce3a26..9420ba2 100644
--- a/webrtc/modules/bitrate_controller/OWNERS
+++ b/webrtc/modules/bitrate_controller/OWNERS
@@ -8,3 +8,5 @@
 # structural changes, please get a review from a reviewer in this file.
 per-file *.gyp=*
 per-file *.gypi=*
+

+per-file BUILD.gn=kjellander@webrtc.org

diff --git a/webrtc/modules/desktop_capture/BUILD.gn b/webrtc/modules/desktop_capture/BUILD.gn
new file mode 100644
index 0000000..0ccb18a
--- /dev/null
+++ b/webrtc/modules/desktop_capture/BUILD.gn
@@ -0,0 +1,19 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# 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.
+
+import("../../build/webrtc.gni")
+
+source_set("desktop_capture") {
+  # TODO(jiayl): Implement.
+}
+
+if (!is_ios && (cpu_arch == "x86" || cpu_arch == "x64")) {
+  source_set("desktop_capture_differ_sse2") {
+    # TODO(jiayl): Implement.
+  }
+}
diff --git a/webrtc/modules/desktop_capture/OWNERS b/webrtc/modules/desktop_capture/OWNERS
index e85861b..4c0340d 100644
--- a/webrtc/modules/desktop_capture/OWNERS
+++ b/webrtc/modules/desktop_capture/OWNERS
@@ -6,3 +6,5 @@
 # structural changes, please get a review from a reviewer in this file.
 per-file *.gyp=*
 per-file *.gypi=*
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/webrtc/modules/media_file/BUILD.gn b/webrtc/modules/media_file/BUILD.gn
new file mode 100644
index 0000000..971a6fa
--- /dev/null
+++ b/webrtc/modules/media_file/BUILD.gn
@@ -0,0 +1,41 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# 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.
+
+import("../../build/webrtc.gni")
+
+config("internal_config") {
+  visibility = ":*"  # Only targets in this file can depend on this.
+  include_dirs = [
+    "interface",
+    "../interface",
+  ]
+}
+
+source_set("media_file") {
+  sources = [
+    "interface/media_file.h",
+    "interface/media_file_defines.h",
+    "source/avi_file.cc",
+    "source/avi_file.h",
+    "source/media_file_impl.cc",
+    "source/media_file_impl.h",
+    "source/media_file_utility.cc",
+    "source/media_file_utility.h",
+  ]
+
+  if (is_win) {
+    cflags = [
+      # TODO(jschuh): Bug 1348: fix this warning.
+      "/wd4267",  # size_t to int truncations
+    ]
+  }
+
+  direct_dependent_configs = [ ":internal_config" ]
+
+  deps = [ "../../system_wrappers" ]
+}
diff --git a/webrtc/modules/media_file/OWNERS b/webrtc/modules/media_file/OWNERS
index 2cc47e4..3387ee9 100644
--- a/webrtc/modules/media_file/OWNERS
+++ b/webrtc/modules/media_file/OWNERS
@@ -1,4 +1,6 @@
 pwestin@webrtc.org

 mflodman@webrtc.org

 perkj@webrtc.org

-niklas.enbom@webrtc.org
\ No newline at end of file
+niklas.enbom@webrtc.org

+

+per-file BUILD.gn=kjellander@webrtc.org

diff --git a/webrtc/modules/pacing/BUILD.gn b/webrtc/modules/pacing/BUILD.gn
new file mode 100644
index 0000000..d3eceb3
--- /dev/null
+++ b/webrtc/modules/pacing/BUILD.gn
@@ -0,0 +1,16 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# 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.
+
+source_set("pacing") {
+  sources = [
+    "include/paced_sender.h",
+    "paced_sender.cc",
+  ]
+
+  deps = [ "../../system_wrappers" ]
+}
diff --git a/webrtc/modules/pacing/OWNERS b/webrtc/modules/pacing/OWNERS
index 1426abc..4486a81 100644
--- a/webrtc/modules/pacing/OWNERS
+++ b/webrtc/modules/pacing/OWNERS
@@ -7,3 +7,5 @@
 # structural changes, please get a review from a reviewer in this file.
 per-file *.gyp=*
 per-file *.gypi=*
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/webrtc/modules/remote_bitrate_estimator/BUILD.gn b/webrtc/modules/remote_bitrate_estimator/BUILD.gn
new file mode 100644
index 0000000..7ee4c8d
--- /dev/null
+++ b/webrtc/modules/remote_bitrate_estimator/BUILD.gn
@@ -0,0 +1,17 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# 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.
+
+source_set("remote_bitrate_estimator") {
+  sources = [
+    "overuse_detector.cc",
+    "overuse_detector.h",
+    "remote_bitrate_estimator_single_stream.cc",
+    "remote_rate_control.cc",
+    "remote_rate_control.h",
+  ]
+}
diff --git a/webrtc/modules/remote_bitrate_estimator/OWNERS b/webrtc/modules/remote_bitrate_estimator/OWNERS
index eab2b8e..49d1942 100644
--- a/webrtc/modules/remote_bitrate_estimator/OWNERS
+++ b/webrtc/modules/remote_bitrate_estimator/OWNERS
@@ -3,7 +3,10 @@
 henrik.lundin@webrtc.org
 mflodman@webrtc.org
 asapersson@webrtc.org
+
 # These are for the common case of adding or renaming files. If you're doing
 # structural changes, please get a review from a reviewer in this file.
 per-file *.gyp=*
 per-file *.gypi=*
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/webrtc/modules/rtp_rtcp/BUILD.gn b/webrtc/modules/rtp_rtcp/BUILD.gn
new file mode 100644
index 0000000..e9a2e8d
--- /dev/null
+++ b/webrtc/modules/rtp_rtcp/BUILD.gn
@@ -0,0 +1,104 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# 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.
+
+import("../../build/webrtc.gni")
+
+source_set("rtp_rtcp") {
+  sources = [
+    # Common
+    "interface/fec_receiver.h",
+    "interface/receive_statistics.h",
+    "interface/remote_ntp_time_estimator.h",
+    "interface/rtp_header_parser.h",
+    "interface/rtp_payload_registry.h",
+    "interface/rtp_receiver.h",
+    "interface/rtp_rtcp.h",
+    "interface/rtp_rtcp_defines.h",
+    "source/bitrate.cc",
+    "source/bitrate.h",
+    "source/byte_io.h",
+    "source/fec_receiver_impl.cc",
+    "source/fec_receiver_impl.h",
+    "source/receive_statistics_impl.cc",
+    "source/receive_statistics_impl.h",
+    "source/remote_ntp_time_estimator.cc",
+    "source/rtp_header_parser.cc",
+    "source/rtp_rtcp_config.h",
+    "source/rtp_rtcp_impl.cc",
+    "source/rtp_rtcp_impl.h",
+    "source/rtcp_packet.cc",
+    "source/rtcp_packet.h",
+    "source/rtcp_receiver.cc",
+    "source/rtcp_receiver.h",
+    "source/rtcp_receiver_help.cc",
+    "source/rtcp_receiver_help.h",
+    "source/rtcp_sender.cc",
+    "source/rtcp_sender.h",
+    "source/rtcp_utility.cc",
+    "source/rtcp_utility.h",
+    "source/rtp_header_extension.cc",
+    "source/rtp_header_extension.h",
+    "source/rtp_receiver_impl.cc",
+    "source/rtp_receiver_impl.h",
+    "source/rtp_sender.cc",
+    "source/rtp_sender.h",
+    "source/rtp_utility.cc",
+    "source/rtp_utility.h",
+    "source/ssrc_database.cc",
+    "source/ssrc_database.h",
+    "source/tmmbr_help.cc",
+    "source/tmmbr_help.h",
+    # Audio Files
+    "source/dtmf_queue.cc",
+    "source/dtmf_queue.h",
+    "source/rtp_receiver_audio.cc",
+    "source/rtp_receiver_audio.h",
+    "source/rtp_sender_audio.cc",
+    "source/rtp_sender_audio.h",
+    # Video Files
+    "source/fec_private_tables_random.h",
+    "source/fec_private_tables_bursty.h",
+    "source/forward_error_correction.cc",
+    "source/forward_error_correction.h",
+    "source/forward_error_correction_internal.cc",
+    "source/forward_error_correction_internal.h",
+    "source/producer_fec.cc",
+    "source/producer_fec.h",
+    "source/rtp_packet_history.cc",
+    "source/rtp_packet_history.h",
+    "source/rtp_payload_registry.cc",
+    "source/rtp_receiver_strategy.cc",
+    "source/rtp_receiver_strategy.h",
+    "source/rtp_receiver_video.cc",
+    "source/rtp_receiver_video.h",
+    "source/rtp_sender_video.cc",
+    "source/rtp_sender_video.h",
+    "source/video_codec_information.h",
+    "source/rtp_format_vp8.cc",
+    "source/rtp_format_vp8.h",
+    "source/rtp_format_video_generic.h",
+    "source/vp8_partition_aggregator.cc",
+    "source/vp8_partition_aggregator.h",
+    # Mocks
+    "mocks/mock_rtp_rtcp.h",
+    "source/mock/mock_rtp_payload_strategy.h",
+  ]
+
+  deps = [
+    "../../system_wrappers",
+    "../pacing",
+    "../remote_bitrate_estimator",
+  ]
+
+  if (is_win) {
+    cflags = [
+      # TODO(jschuh): Bug 1348: fix this warning.
+      "/wd4267",  # size_t to int truncations
+    ]
+  }
+}
diff --git a/webrtc/modules/rtp_rtcp/OWNERS b/webrtc/modules/rtp_rtcp/OWNERS
index c968564..cafe4c1 100644
--- a/webrtc/modules/rtp_rtcp/OWNERS
+++ b/webrtc/modules/rtp_rtcp/OWNERS
@@ -2,4 +2,6 @@
 stefan@webrtc.org

 henrik.lundin@webrtc.org

 mflodman@webrtc.org

-asapersson@webrtc.org
\ No newline at end of file
+asapersson@webrtc.org

+

+per-file BUILD.gn=kjellander@webrtc.org

diff --git a/webrtc/modules/utility/BUILD.gn b/webrtc/modules/utility/BUILD.gn
new file mode 100644
index 0000000..8251204
--- /dev/null
+++ b/webrtc/modules/utility/BUILD.gn
@@ -0,0 +1,48 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# 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.
+
+import("../../build/webrtc.gni")
+
+source_set("utility") {
+  sources = [
+    "interface/audio_frame_operations.h",
+    "interface/file_player.h",
+    "interface/file_recorder.h",
+    "interface/helpers_android.h",
+    "interface/process_thread.h",
+    "interface/rtp_dump.h",
+    "source/audio_frame_operations.cc",
+    "source/coder.cc",
+    "source/coder.h",
+    "source/file_player_impl.cc",
+    "source/file_player_impl.h",
+    "source/file_recorder_impl.cc",
+    "source/file_recorder_impl.h",
+    "source/helpers_android.cc",
+    "source/process_thread_impl.cc",
+    "source/process_thread_impl.h",
+    "source/rtp_dump_impl.cc",
+    "source/rtp_dump_impl.h",
+  ]
+
+  deps = [
+    "../../common_audio",
+    "../../system_wrappers",
+    "../audio_coding",
+    "../media_file",
+  ]
+  if (enable_video) {
+    sources += [
+      "source/frame_scaler.cc",
+      "source/video_coder.cc",
+      "source/video_frames_queue.cc",
+    ]
+
+    deps += [ "../video_coding" ]
+  }
+}
diff --git a/webrtc/modules/utility/OWNERS b/webrtc/modules/utility/OWNERS
index 674c738..dbdb53e 100644
--- a/webrtc/modules/utility/OWNERS
+++ b/webrtc/modules/utility/OWNERS
@@ -1,4 +1,6 @@
 henrike@webrtc.org
 pwestin@webrtc.org
 asapersson@webrtc.org
-perkj@webrtc.org
\ No newline at end of file
+perkj@webrtc.org
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/webrtc/modules/video_capture/BUILD.gn b/webrtc/modules/video_capture/BUILD.gn
new file mode 100644
index 0000000..fd3fe57
--- /dev/null
+++ b/webrtc/modules/video_capture/BUILD.gn
@@ -0,0 +1,13 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# 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.
+
+import("../../build/webrtc.gni")
+
+source_set("video_capture") {
+  # TODO(glaznev): Implement.
+}
diff --git a/webrtc/modules/video_capture/OWNERS b/webrtc/modules/video_capture/OWNERS
index fdc2a3f..ba89765 100644
--- a/webrtc/modules/video_capture/OWNERS
+++ b/webrtc/modules/video_capture/OWNERS
@@ -11,3 +11,5 @@
 # structural changes, please get a review from a reviewer in this file.
 per-file *.gyp=*
 per-file *.gypi=*
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/webrtc/modules/video_coding/BUILD.gn b/webrtc/modules/video_coding/BUILD.gn
new file mode 100644
index 0000000..f5a69b1
--- /dev/null
+++ b/webrtc/modules/video_coding/BUILD.gn
@@ -0,0 +1,86 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# 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.
+
+import("../../build/webrtc.gni")
+
+source_set("video_coding") {
+  sources = [
+    "main/interface/video_coding.h",
+    "main/interface/video_coding_defines.h",
+    "main/source/codec_database.cc",
+    "main/source/codec_database.h",
+    "main/source/codec_timer.cc",
+    "main/source/codec_timer.h",
+    "main/source/content_metrics_processing.cc",
+    "main/source/content_metrics_processing.h",
+    "main/source/decoding_state.cc",
+    "main/source/decoding_state.h",
+    "main/source/encoded_frame.cc",
+    "main/source/encoded_frame.h",
+    "main/source/er_tables_xor.h",
+    "main/source/fec_tables_xor.h",
+    "main/source/frame_buffer.cc",
+    "main/source/frame_buffer.h",
+    "main/source/generic_decoder.cc",
+    "main/source/generic_decoder.h",
+    "main/source/generic_encoder.cc",
+    "main/source/generic_encoder.h",
+    "main/source/inter_frame_delay.cc",
+    "main/source/inter_frame_delay.h",
+    "main/source/internal_defines.h",
+    "main/source/jitter_buffer.cc",
+    "main/source/jitter_buffer.h",
+    "main/source/jitter_buffer_common.h",
+    "main/source/jitter_estimator.cc",
+    "main/source/jitter_estimator.h",
+    "main/source/media_opt_util.cc",
+    "main/source/media_opt_util.h",
+    "main/source/media_optimization.cc",
+    "main/source/media_optimization.h",
+    "main/source/nack_fec_tables.h",
+    "main/source/packet.cc",
+    "main/source/packet.h",
+    "main/source/qm_select_data.h",
+    "main/source/qm_select.cc",
+    "main/source/qm_select.h",
+    "main/source/receiver.cc",
+    "main/source/receiver.h",
+    "main/source/rtt_filter.cc",
+    "main/source/rtt_filter.h",
+    "main/source/session_info.cc",
+    "main/source/session_info.h",
+    "main/source/timestamp_map.cc",
+    "main/source/timestamp_map.h",
+    "main/source/timing.cc",
+    "main/source/timing.h",
+    "main/source/video_coding_impl.cc",
+    "main/source/video_coding_impl.h",
+    "main/source/video_receiver.cc",
+    "main/source/video_sender.cc",
+  ]
+
+  deps = [
+    ":video_coding_utility",
+    ":webrtc_i420",
+    ":webrtc_vp8",
+    "../../common_video",
+    "../../system_wrappers",
+  ]
+}
+
+source_set("video_coding_utility") {
+  # TODO(stefan): Implement.
+}
+
+source_set("webrtc_i420") {
+  # TODO(stefan): Implement.
+}
+
+source_set("webrtc_vp8") {
+  # TODO(stefan): Implement.
+}
diff --git a/webrtc/modules/video_coding/OWNERS b/webrtc/modules/video_coding/OWNERS
index 7183cf2..037de93 100644
--- a/webrtc/modules/video_coding/OWNERS
+++ b/webrtc/modules/video_coding/OWNERS
@@ -2,3 +2,5 @@
 mikhal@webrtc.org
 marpan@webrtc.org
 henrik.lundin@webrtc.org
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/webrtc/modules/video_processing/BUILD.gn b/webrtc/modules/video_processing/BUILD.gn
new file mode 100644
index 0000000..40171ca
--- /dev/null
+++ b/webrtc/modules/video_processing/BUILD.gn
@@ -0,0 +1,13 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# 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.
+
+import("../../build/webrtc.gni")
+
+source_set("video_processing") {
+  # TODO(stefan): Implement.
+}
diff --git a/webrtc/modules/video_processing/OWNERS b/webrtc/modules/video_processing/OWNERS
new file mode 100644
index 0000000..d5ae847
--- /dev/null
+++ b/webrtc/modules/video_processing/OWNERS
@@ -0,0 +1 @@
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/webrtc/modules/video_render/BUILD.gn b/webrtc/modules/video_render/BUILD.gn
new file mode 100644
index 0000000..c569b7f
--- /dev/null
+++ b/webrtc/modules/video_render/BUILD.gn
@@ -0,0 +1,13 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# 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.
+
+import("../../build/webrtc.gni")
+
+source_set("video_render") {
+  # TODO(wuchengli): Implement.
+}
diff --git a/webrtc/modules/video_render/OWNERS b/webrtc/modules/video_render/OWNERS
index 7dd4a36..da941f4 100644
--- a/webrtc/modules/video_render/OWNERS
+++ b/webrtc/modules/video_render/OWNERS
@@ -10,3 +10,5 @@
 # structural changes, please get a review from a reviewer in this file.
 per-file *.gyp=*
 per-file *.gypi=*
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/webrtc/system_wrappers/OWNERS b/webrtc/system_wrappers/OWNERS
index 4091a93..d292dfd 100644
--- a/webrtc/system_wrappers/OWNERS
+++ b/webrtc/system_wrappers/OWNERS
@@ -4,4 +4,6 @@
 henrika@webrtc.org
 henrikg@webrtc.org
 mflodman@webrtc.org
-niklas.enbom@webrtc.org
\ No newline at end of file
+niklas.enbom@webrtc.org
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/webrtc/video/BUILD.gn b/webrtc/video/BUILD.gn
new file mode 100644
index 0000000..18c43f9
--- /dev/null
+++ b/webrtc/video/BUILD.gn
@@ -0,0 +1,14 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# 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.
+
+import("../build/webrtc.gni")
+
+source_set("video") {
+  # TODO(pbos): Implement when video_engine_core is done.
+}
+
diff --git a/webrtc/video/OWNERS b/webrtc/video/OWNERS
index cb0452f..78a3967 100644
--- a/webrtc/video/OWNERS
+++ b/webrtc/video/OWNERS
@@ -7,3 +7,5 @@
 # structural changes, please get a review from a reviewer in this file.
 per-file *.gyp=*
 per-file *.gypi=*
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/webrtc/video_engine/BUILD.gn b/webrtc/video_engine/BUILD.gn
new file mode 100644
index 0000000..c93833a
--- /dev/null
+++ b/webrtc/video_engine/BUILD.gn
@@ -0,0 +1,17 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# 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.
+
+import("../build/webrtc.gni")
+
+source_set("video_engine") {
+  deps = [ ":video_engine_core" ]
+}
+
+source_set("video_engine_core") {
+  # TODO(pbos): Implement.
+}
diff --git a/webrtc/video_engine/OWNERS b/webrtc/video_engine/OWNERS
index 14bb8f3..5fabf11 100644
--- a/webrtc/video_engine/OWNERS
+++ b/webrtc/video_engine/OWNERS
@@ -9,3 +9,6 @@
 # structural changes, please get a review from a reviewer in this file.
 per-file *.gyp=*
 per-file *.gypi=*
+
+per-file BUILD.gn=kjellander@webrtc.org
+
diff --git a/webrtc/voice_engine/BUILD.gn b/webrtc/voice_engine/BUILD.gn
new file mode 100644
index 0000000..7c1a1b1
--- /dev/null
+++ b/webrtc/voice_engine/BUILD.gn
@@ -0,0 +1,13 @@
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+#
+# 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.
+
+import("../build/webrtc.gni")
+
+source_set("voice_engine") {
+  # TODO(henrika): Implement.
+}
diff --git a/webrtc/voice_engine/OWNERS b/webrtc/voice_engine/OWNERS
index 7bb3cd5..1fe4594 100644
--- a/webrtc/voice_engine/OWNERS
+++ b/webrtc/voice_engine/OWNERS
@@ -9,3 +9,5 @@
 # structural changes, please get a review from a reviewer in this file.
 per-file *.gyp=*
 per-file *.gypi=*
+
+per-file BUILD.gn=kjellander@webrtc.org