Reland "Move webrtc/audio/audio_sink.h to webrtc/ and fix some dependencies."

This is a reland of https://codereview.webrtc.org/1737593002/ minus
the added missing headers in webrtc/{BUILD.gn,webrtc.gyp} and
webrtc/common.gyp that breaks GN in Chromium since it's using
the --check flag (which we should support).

BUG=webrtc:4243, webrtc:5589
TESTED=Tried generating GN files with --check in a Chromium checkout with this patch applied, successfully.
TBR=pbos@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, tommi@webrtc.org

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

Cr-Original-Commit-Position: refs/heads/master@{#11794}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: 7ffeab525c30124ac19bb96829aec0a7b7cd6641
diff --git a/api/remoteaudiosource.h b/api/remoteaudiosource.h
index 20e5d90..72ed17c 100644
--- a/api/remoteaudiosource.h
+++ b/api/remoteaudiosource.h
@@ -16,7 +16,7 @@
 
 #include "webrtc/api/mediastreaminterface.h"
 #include "webrtc/api/notifier.h"
-#include "webrtc/audio/audio_sink.h"
+#include "webrtc/audio_sink.h"
 #include "webrtc/base/criticalsection.h"
 #include "webrtc/media/base/audiorenderer.h"
 
diff --git a/api/webrtcsession.cc b/api/webrtcsession.cc
index b249414..e5cea14 100644
--- a/api/webrtcsession.cc
+++ b/api/webrtcsession.cc
@@ -23,7 +23,7 @@
 #include "webrtc/api/peerconnectioninterface.h"
 #include "webrtc/api/sctputils.h"
 #include "webrtc/api/webrtcsessiondescriptionfactory.h"
-#include "webrtc/audio/audio_sink.h"
+#include "webrtc/audio_sink.h"
 #include "webrtc/base/basictypes.h"
 #include "webrtc/base/checks.h"
 #include "webrtc/base/helpers.h"
diff --git a/audio/audio_receive_stream.cc b/audio/audio_receive_stream.cc
index 2c58def..9c25389 100644
--- a/audio/audio_receive_stream.cc
+++ b/audio/audio_receive_stream.cc
@@ -13,7 +13,7 @@
 #include <string>
 #include <utility>
 
-#include "webrtc/audio/audio_sink.h"
+#include "webrtc/audio_sink.h"
 #include "webrtc/audio/audio_state.h"
 #include "webrtc/audio/conversion.h"
 #include "webrtc/base/checks.h"
diff --git a/audio/webrtc_audio.gypi b/audio/webrtc_audio.gypi
index 53b7d16..9b4879a 100644
--- a/audio/webrtc_audio.gypi
+++ b/audio/webrtc_audio.gypi
@@ -18,7 +18,6 @@
       'audio/audio_receive_stream.h',
       'audio/audio_send_stream.cc',
       'audio/audio_send_stream.h',
-      'audio/audio_sink.h',
       'audio/audio_state.cc',
       'audio/audio_state.h',
       'audio/conversion.h',
diff --git a/audio/audio_sink.h b/audio_sink.h
similarity index 92%
rename from audio/audio_sink.h
rename to audio_sink.h
index 999644f..2c932c5 100644
--- a/audio/audio_sink.h
+++ b/audio_sink.h
@@ -8,8 +8,8 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_AUDIO_AUDIO_SINK_H_
-#define WEBRTC_AUDIO_AUDIO_SINK_H_
+#ifndef WEBRTC_AUDIO_SINK_H_
+#define WEBRTC_AUDIO_SINK_H_
 
 #if defined(WEBRTC_POSIX) && !defined(__STDC_FORMAT_MACROS)
 // Avoid conflict with format_macros.h.
@@ -50,4 +50,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_AUDIO_AUDIO_SINK_H_
+#endif  // WEBRTC_AUDIO_SINK_H_
diff --git a/common.gyp b/common.gyp
index 3b5fe90..2970877 100644
--- a/common.gyp
+++ b/common.gyp
@@ -12,6 +12,7 @@
       'target_name': 'webrtc_common',
       'type': 'static_library',
       'sources': [
+        'audio_sink.h',
         'common_types.cc',
         'common_types.h',
         'config.h',
diff --git a/media/base/fakemediaengine.h b/media/base/fakemediaengine.h
index af09f13..afd262b 100644
--- a/media/base/fakemediaengine.h
+++ b/media/base/fakemediaengine.h
@@ -18,7 +18,7 @@
 #include <string>
 #include <vector>
 
-#include "webrtc/audio/audio_sink.h"
+#include "webrtc/audio_sink.h"
 #include "webrtc/base/buffer.h"
 #include "webrtc/base/stringutils.h"
 #include "webrtc/media/base/audiorenderer.h"
diff --git a/media/engine/fakewebrtccall.cc b/media/engine/fakewebrtccall.cc
index c373770..1af11af 100644
--- a/media/engine/fakewebrtccall.cc
+++ b/media/engine/fakewebrtccall.cc
@@ -13,7 +13,7 @@
 #include <algorithm>
 #include <utility>
 
-#include "webrtc/audio/audio_sink.h"
+#include "webrtc/audio_sink.h"
 #include "webrtc/base/checks.h"
 #include "webrtc/base/gunit.h"
 #include "webrtc/media/base/rtputils.h"
diff --git a/media/engine/webrtcvoiceengine.cc b/media/engine/webrtcvoiceengine.cc
index 28c5079..2cd19e7 100644
--- a/media/engine/webrtcvoiceengine.cc
+++ b/media/engine/webrtcvoiceengine.cc
@@ -21,7 +21,7 @@
 #include <string>
 #include <vector>
 
-#include "webrtc/audio/audio_sink.h"
+#include "webrtc/audio_sink.h"
 #include "webrtc/base/arraysize.h"
 #include "webrtc/base/base64.h"
 #include "webrtc/base/byteorder.h"
diff --git a/pc/channel.cc b/pc/channel.cc
index 21e58e4..6c9d722 100644
--- a/pc/channel.cc
+++ b/pc/channel.cc
@@ -12,7 +12,7 @@
 
 #include "webrtc/pc/channel.h"
 
-#include "webrtc/audio/audio_sink.h"
+#include "webrtc/audio_sink.h"
 #include "webrtc/base/bind.h"
 #include "webrtc/base/buffer.h"
 #include "webrtc/base/byteorder.h"
diff --git a/pc/channel.h b/pc/channel.h
index abecd66..f728189 100644
--- a/pc/channel.h
+++ b/pc/channel.h
@@ -17,7 +17,7 @@
 #include <utility>
 #include <vector>
 
-#include "webrtc/audio/audio_sink.h"
+#include "webrtc/audio_sink.h"
 #include "webrtc/base/asyncudpsocket.h"
 #include "webrtc/base/criticalsection.h"
 #include "webrtc/base/network.h"
diff --git a/video/BUILD.gn b/video/BUILD.gn
index e35772e..4f1b7ae 100644
--- a/video/BUILD.gn
+++ b/video/BUILD.gn
@@ -60,9 +60,12 @@
   deps = [
     "..:rtc_event_log",
     "..:webrtc_common",
+    "../base:rtc_base_approved",
     "../common_video",
     "../modules/bitrate_controller",
+    "../modules/congestion_controller",
     "../modules/pacing",
+    "../modules/remote_bitrate_estimator",
     "../modules/rtp_rtcp",
     "../modules/utility",
     "../modules/video_capture:video_capture_module",
diff --git a/video/webrtc_video.gypi b/video/webrtc_video.gypi
index db8d5c7..f11ce95 100644
--- a/video/webrtc_video.gypi
+++ b/video/webrtc_video.gypi
@@ -12,6 +12,7 @@
       '<(webrtc_root)/common.gyp:webrtc_common',
       '<(webrtc_root)/common_video/common_video.gyp:common_video',
       '<(webrtc_root)/modules/modules.gyp:bitrate_controller',
+      '<(webrtc_root)/modules/modules.gyp:congestion_controller',
       '<(webrtc_root)/modules/modules.gyp:paced_sender',
       '<(webrtc_root)/modules/modules.gyp:rtp_rtcp',
       '<(webrtc_root)/modules/modules.gyp:video_capture_module',
diff --git a/voice_engine/BUILD.gn b/voice_engine/BUILD.gn
index 82cd923..13104c6 100644
--- a/voice_engine/BUILD.gn
+++ b/voice_engine/BUILD.gn
@@ -99,6 +99,7 @@
   deps = [
     "..:rtc_event_log",
     "..:webrtc_common",
+    "../base:rtc_base_approved",
     "../common_audio",
     "../modules/audio_coding",
     "../modules/audio_conference_mixer",
diff --git a/voice_engine/channel.h b/voice_engine/channel.h
index 0e87252..a3cd5d6 100644
--- a/voice_engine/channel.h
+++ b/voice_engine/channel.h
@@ -13,7 +13,7 @@
 
 #include <memory>
 
-#include "webrtc/audio/audio_sink.h"
+#include "webrtc/audio_sink.h"
 #include "webrtc/base/criticalsection.h"
 #include "webrtc/common_audio/resampler/include/push_resampler.h"
 #include "webrtc/common_types.h"
diff --git a/voice_engine/channel_proxy.cc b/voice_engine/channel_proxy.cc
index 3beaf9b..da7864f 100644
--- a/voice_engine/channel_proxy.cc
+++ b/voice_engine/channel_proxy.cc
@@ -12,7 +12,7 @@
 
 #include <utility>
 
-#include "webrtc/audio/audio_sink.h"
+#include "webrtc/audio_sink.h"
 #include "webrtc/base/checks.h"
 #include "webrtc/voice_engine/channel.h"
 
diff --git a/voice_engine/voice_engine.gyp b/voice_engine/voice_engine.gyp
index ff588d8..cff2d8f 100644
--- a/voice_engine/voice_engine.gyp
+++ b/voice_engine/voice_engine.gyp
@@ -15,6 +15,7 @@
       'target_name': 'voice_engine',
       'type': 'static_library',
       'dependencies': [
+        '<(webrtc_root)/base/base.gyp:rtc_base_approved',
         '<(webrtc_root)/common.gyp:webrtc_common',
         '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
         '<(webrtc_root)/modules/modules.gyp:audio_coding_module',