Revert "Reland "Make rtc_base/refcount.h self contained, not including refcountedobject.h.""

This reverts commit bf6937a8e90f94ac0ae50a296574b9f262b0932f.

Reason for revert: Broke internal projects.

Original change's description:
> Reland "Make rtc_base/refcount.h self contained, not including refcountedobject.h."
> 
> This is a reland of b7239a9dc825ddb25dbc800aed3a065163b9a10e
> Original change's description:
> > Make rtc_base/refcount.h self contained, not including refcountedobject.h.
> > 
> > The refcount.h file doesn't depend on anything from
> > refcountedobject.h. The motivation of this change to make it possible
> > to add additional declarations to refcount.h, and include it from
> > refcountedobject.h.
> > 
> > Bug: webrtc:8270
> > Change-Id: I24f6131f471e675570968d00065ff9b1f55e3373
> > Reviewed-on: https://webrtc-review.googlesource.com/5760
> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> > Commit-Queue: Niels Moller <nisse@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#20106}
> 
> Bug: webrtc:8270
> Change-Id: I9738f6680ab52d0f43639a1a39175fdba5957681
> Reviewed-on: https://webrtc-review.googlesource.com/5840
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20180}

TBR=kwiberg@webrtc.org,nisse@webrtc.org

Change-Id: I342b241f5bb707b59ccf2d15a1a5befecb53a52e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8270
Reviewed-on: https://webrtc-review.googlesource.com/7280
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20181}
diff --git a/api/audio_codecs/audio_decoder_factory_template.h b/api/audio_codecs/audio_decoder_factory_template.h
index a1933aa..eb13e9f 100644
--- a/api/audio_codecs/audio_decoder_factory_template.h
+++ b/api/audio_codecs/audio_decoder_factory_template.h
@@ -15,7 +15,6 @@
 #include <vector>
 
 #include "api/audio_codecs/audio_decoder_factory.h"
-#include "rtc_base/refcountedobject.h"
 #include "rtc_base/scoped_ref_ptr.h"
 
 namespace webrtc {
diff --git a/api/audio_codecs/audio_encoder_factory_template.h b/api/audio_codecs/audio_encoder_factory_template.h
index 252a9bd..8df582e 100644
--- a/api/audio_codecs/audio_encoder_factory_template.h
+++ b/api/audio_codecs/audio_encoder_factory_template.h
@@ -15,7 +15,6 @@
 #include <vector>
 
 #include "api/audio_codecs/audio_encoder_factory.h"
-#include "rtc_base/refcountedobject.h"
 #include "rtc_base/scoped_ref_ptr.h"
 
 namespace webrtc {
diff --git a/api/proxy.h b/api/proxy.h
index 175c6b7..c597165 100644
--- a/api/proxy.h
+++ b/api/proxy.h
@@ -56,7 +56,6 @@
 #include <utility>
 
 #include "rtc_base/event.h"
-#include "rtc_base/refcountedobject.h"
 #include "rtc_base/thread.h"
 
 namespace webrtc {
diff --git a/api/stats/rtcstatsreport.h b/api/stats/rtcstatsreport.h
index ee56b35..027041a 100644
--- a/api/stats/rtcstatsreport.h
+++ b/api/stats/rtcstatsreport.h
@@ -18,7 +18,6 @@
 
 #include "api/stats/rtcstats.h"
 #include "rtc_base/refcount.h"
-#include "rtc_base/refcountedobject.h"
 #include "rtc_base/scoped_ref_ptr.h"
 
 namespace webrtc {
diff --git a/api/statstypes.cc b/api/statstypes.cc
index 940fb73..f1a1130 100644
--- a/api/statstypes.cc
+++ b/api/statstypes.cc
@@ -13,7 +13,6 @@
 #include <string.h>
 
 #include "rtc_base/checks.h"
-#include "rtc_base/refcountedobject.h"
 
 // TODO(tommi): Could we have a static map of value name -> expected type
 // and use this to RTC_DCHECK on correct usage (somewhat strongly typed values)?
diff --git a/common_video/include/i420_buffer_pool.h b/common_video/include/i420_buffer_pool.h
index 863eb10..f43a948 100644
--- a/common_video/include/i420_buffer_pool.h
+++ b/common_video/include/i420_buffer_pool.h
@@ -16,7 +16,6 @@
 
 #include "api/video/i420_buffer.h"
 #include "rtc_base/race_checker.h"
-#include "rtc_base/refcountedobject.h"
 
 namespace webrtc {
 
diff --git a/modules/audio_coding/acm2/audio_coding_module_unittest.cc b/modules/audio_coding/acm2/audio_coding_module_unittest.cc
index 6d0c37e..a010619 100644
--- a/modules/audio_coding/acm2/audio_coding_module_unittest.cc
+++ b/modules/audio_coding/acm2/audio_coding_module_unittest.cc
@@ -37,7 +37,6 @@
 #include "rtc_base/criticalsection.h"
 #include "rtc_base/md5digest.h"
 #include "rtc_base/platform_thread.h"
-#include "rtc_base/refcountedobject.h"
 #include "rtc_base/thread_annotations.h"
 #include "system_wrappers/include/clock.h"
 #include "system_wrappers/include/event_wrapper.h"
diff --git a/modules/audio_coding/neteq/decoder_database_unittest.cc b/modules/audio_coding/neteq/decoder_database_unittest.cc
index 626420a..be3c0b7 100644
--- a/modules/audio_coding/neteq/decoder_database_unittest.cc
+++ b/modules/audio_coding/neteq/decoder_database_unittest.cc
@@ -16,7 +16,6 @@
 #include <string>
 
 #include "api/audio_codecs/builtin_audio_decoder_factory.h"
-#include "rtc_base/refcountedobject.h"
 #include "test/gmock.h"
 #include "test/gtest.h"
 #include "test/mock_audio_decoder.h"
diff --git a/modules/audio_device/audio_device_impl.cc b/modules/audio_device/audio_device_impl.cc
index 1296ddb..5701f59 100644
--- a/modules/audio_device/audio_device_impl.cc
+++ b/modules/audio_device/audio_device_impl.cc
@@ -15,7 +15,6 @@
 #include "rtc_base/checks.h"
 #include "rtc_base/logging.h"
 #include "rtc_base/refcount.h"
-#include "rtc_base/refcountedobject.h"
 #include "rtc_base/timeutils.h"
 #include "system_wrappers/include/metrics.h"
 
diff --git a/modules/audio_mixer/audio_mixer_impl.cc b/modules/audio_mixer/audio_mixer_impl.cc
index 9ff5774..51f6658 100644
--- a/modules/audio_mixer/audio_mixer_impl.cc
+++ b/modules/audio_mixer/audio_mixer_impl.cc
@@ -18,7 +18,6 @@
 #include "modules/audio_mixer/audio_frame_manipulator.h"
 #include "modules/audio_mixer/default_output_rate_calculator.h"
 #include "rtc_base/logging.h"
-#include "rtc_base/refcountedobject.h"
 
 namespace webrtc {
 namespace {
diff --git a/modules/audio_processing/audio_processing_impl.cc b/modules/audio_processing/audio_processing_impl.cc
index 48c5107..d2d6668 100644
--- a/modules/audio_processing/audio_processing_impl.cc
+++ b/modules/audio_processing/audio_processing_impl.cc
@@ -32,7 +32,6 @@
 #include "rtc_base/checks.h"
 #include "rtc_base/logging.h"
 #include "rtc_base/platform_file.h"
-#include "rtc_base/refcountedobject.h"
 #include "rtc_base/trace_event.h"
 #if WEBRTC_INTELLIGIBILITY_ENHANCER
 #include "modules/audio_processing/intelligibility/intelligibility_enhancer.h"
diff --git a/modules/audio_processing/audio_processing_unittest.cc b/modules/audio_processing/audio_processing_unittest.cc
index 3bf6fd2..6893159 100644
--- a/modules/audio_processing/audio_processing_unittest.cc
+++ b/modules/audio_processing/audio_processing_unittest.cc
@@ -34,7 +34,6 @@
 #include "rtc_base/gtest_prod_util.h"
 #include "rtc_base/ignore_wundef.h"
 #include "rtc_base/protobuf_utils.h"
-#include "rtc_base/refcountedobject.h"
 #include "rtc_base/safe_minmax.h"
 #include "rtc_base/task_queue.h"
 #include "rtc_base/thread.h"
diff --git a/modules/desktop_capture/shared_desktop_frame.h b/modules/desktop_capture/shared_desktop_frame.h
index f70508c..1f01220 100644
--- a/modules/desktop_capture/shared_desktop_frame.h
+++ b/modules/desktop_capture/shared_desktop_frame.h
@@ -14,7 +14,6 @@
 #include "modules/desktop_capture/desktop_frame.h"
 #include "rtc_base/constructormagic.h"
 #include "rtc_base/refcount.h"
-#include "rtc_base/refcountedobject.h"
 #include "rtc_base/scoped_ref_ptr.h"
 
 namespace webrtc {
diff --git a/modules/video_capture/external/video_capture_external.cc b/modules/video_capture/external/video_capture_external.cc
index 3252178..cd85071 100644
--- a/modules/video_capture/external/video_capture_external.cc
+++ b/modules/video_capture/external/video_capture_external.cc
@@ -10,7 +10,6 @@
 
 #include "modules/video_capture/video_capture_impl.h"
 #include "rtc_base/refcount.h"
-#include "rtc_base/refcountedobject.h"
 
 namespace webrtc {
 
diff --git a/modules/video_capture/linux/video_capture_linux.cc b/modules/video_capture/linux/video_capture_linux.cc
index 80810f2..be8e64e 100644
--- a/modules/video_capture/linux/video_capture_linux.cc
+++ b/modules/video_capture/linux/video_capture_linux.cc
@@ -25,7 +25,6 @@
 
 #include "media/base/videocommon.h"
 #include "rtc_base/refcount.h"
-#include "rtc_base/refcountedobject.h"
 #include "rtc_base/scoped_ref_ptr.h"
 #include "rtc_base/logging.h"
 
diff --git a/modules/video_capture/objc/video_capture.mm b/modules/video_capture/objc/video_capture.mm
index 6dd2fd6..4f9c2f3 100644
--- a/modules/video_capture/objc/video_capture.mm
+++ b/modules/video_capture/objc/video_capture.mm
@@ -15,7 +15,6 @@
 #include "modules/video_capture/objc/device_info_objc.h"
 #include "modules/video_capture/objc/rtc_video_capture_objc.h"
 #include "rtc_base/refcount.h"
-#include "rtc_base/refcountedobject.h"
 #include "rtc_base/scoped_ref_ptr.h"
 
 using namespace webrtc;
diff --git a/modules/video_capture/video_capture_impl.cc b/modules/video_capture/video_capture_impl.cc
index 1f40ee7..4d67010 100644
--- a/modules/video_capture/video_capture_impl.cc
+++ b/modules/video_capture/video_capture_impl.cc
@@ -18,7 +18,6 @@
 #include "modules/video_capture/video_capture_config.h"
 #include "rtc_base/logging.h"
 #include "rtc_base/refcount.h"
-#include "rtc_base/refcountedobject.h"
 #include "rtc_base/timeutils.h"
 #include "rtc_base/trace_event.h"
 #include "system_wrappers/include/clock.h"
diff --git a/modules/video_capture/windows/video_capture_factory_windows.cc b/modules/video_capture/windows/video_capture_factory_windows.cc
index 52a3cb5..069f463 100644
--- a/modules/video_capture/windows/video_capture_factory_windows.cc
+++ b/modules/video_capture/windows/video_capture_factory_windows.cc
@@ -11,7 +11,6 @@
 #include "modules/video_capture/windows/video_capture_ds.h"
 #include "modules/video_capture/windows/video_capture_mf.h"
 #include "rtc_base/refcount.h"
-#include "rtc_base/refcountedobject.h"
 #include "rtc_base/scoped_ref_ptr.h"
 
 namespace webrtc {
diff --git a/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.cc b/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.cc
index a7a03e5..0e81923 100644
--- a/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.cc
+++ b/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.cc
@@ -17,7 +17,6 @@
 
 #include "rtc_base/checks.h"
 #include "rtc_base/logging.h"
-#include "rtc_base/refcountedobject.h"
 
 namespace webrtc {
 
diff --git a/modules/video_coding/video_codec_initializer_unittest.cc b/modules/video_coding/video_codec_initializer_unittest.cc
index 48bf466..99239c5 100644
--- a/modules/video_coding/video_codec_initializer_unittest.cc
+++ b/modules/video_coding/video_codec_initializer_unittest.cc
@@ -13,7 +13,6 @@
 #include "common_types.h"  // NOLINT(build/include)
 #include "modules/video_coding/codecs/vp8/temporal_layers.h"
 #include "modules/video_coding/include/video_codec_initializer.h"
-#include "rtc_base/refcountedobject.h"
 #include "test/gtest.h"
 
 namespace webrtc {
diff --git a/pc/audiotrack.cc b/pc/audiotrack.cc
index 4083991..8e24f0b 100644
--- a/pc/audiotrack.cc
+++ b/pc/audiotrack.cc
@@ -11,7 +11,6 @@
 #include "pc/audiotrack.h"
 
 #include "rtc_base/checks.h"
-#include "rtc_base/refcountedobject.h"
 
 using rtc::scoped_refptr;
 
diff --git a/pc/mediastream.cc b/pc/mediastream.cc
index 0d6fcda..0e24ee6 100644
--- a/pc/mediastream.cc
+++ b/pc/mediastream.cc
@@ -11,7 +11,6 @@
 #include "pc/mediastream.h"
 #include "rtc_base/checks.h"
 #include "rtc_base/logging.h"
-#include "rtc_base/refcountedobject.h"
 
 namespace webrtc {
 
diff --git a/pc/test/fakeaudiocapturemodule.cc b/pc/test/fakeaudiocapturemodule.cc
index fe5bf66..ea734ed 100644
--- a/pc/test/fakeaudiocapturemodule.cc
+++ b/pc/test/fakeaudiocapturemodule.cc
@@ -12,7 +12,6 @@
 
 #include "rtc_base/checks.h"
 #include "rtc_base/refcount.h"
-#include "rtc_base/refcountedobject.h"
 #include "rtc_base/thread.h"
 #include "rtc_base/timeutils.h"
 
diff --git a/pc/videotrack.cc b/pc/videotrack.cc
index 718c0d6..00adb3d 100644
--- a/pc/videotrack.cc
+++ b/pc/videotrack.cc
@@ -9,7 +9,6 @@
  */
 
 #include "pc/videotrack.h"
-#include "rtc_base/refcountedobject.h"
 
 #include <string>
 
diff --git a/rtc_base/bind_unittest.cc b/rtc_base/bind_unittest.cc
index 8703be4..7028ced 100644
--- a/rtc_base/bind_unittest.cc
+++ b/rtc_base/bind_unittest.cc
@@ -14,7 +14,6 @@
 #include "rtc_base/gunit.h"
 
 #include "rtc_base/refcount.h"
-#include "rtc_base/refcountedobject.h"
 
 namespace rtc {
 
diff --git a/rtc_base/callback.h b/rtc_base/callback.h
index 0e035ad..1472b25 100644
--- a/rtc_base/callback.h
+++ b/rtc_base/callback.h
@@ -13,7 +13,7 @@
  */
 
 // To generate callback.h from callback.h.pump, execute:
-// ../third_party/googletest/src/googletest/scripts/pump.py callback.h.pump
+// /home/build/google3/third_party/gtest/scripts/pump.py callback.h.pump
 
 // Callbacks are callable object containers. They can hold a function pointer
 // or a function object and behave like a value type. Internally, data is
@@ -63,7 +63,6 @@
 #define RTC_BASE_CALLBACK_H_
 
 #include "rtc_base/refcount.h"
-#include "rtc_base/refcountedobject.h"
 #include "rtc_base/scoped_ref_ptr.h"
 
 namespace rtc {
diff --git a/rtc_base/callback.h.pump b/rtc_base/callback.h.pump
index 2c40eab..383fc19 100644
--- a/rtc_base/callback.h.pump
+++ b/rtc_base/callback.h.pump
@@ -9,7 +9,7 @@
  */
 
 // To generate callback.h from callback.h.pump, execute:
-// ../third_party/googletest/src/googletest/scripts/pump.py callback.h.pump
+// /home/build/google3/third_party/gtest/scripts/pump.py callback.h.pump
 
 // Callbacks are callable object containers. They can hold a function pointer
 // or a function object and behave like a value type. Internally, data is
@@ -58,7 +58,6 @@
 #define RTC_BASE_CALLBACK_H_
 
 #include "rtc_base/refcount.h"
-#include "rtc_base/refcountedobject.h"
 #include "rtc_base/scoped_ref_ptr.h"
 
 namespace rtc {
diff --git a/rtc_base/copyonwritebuffer.h b/rtc_base/copyonwritebuffer.h
index c4bba87..bdfe393 100644
--- a/rtc_base/copyonwritebuffer.h
+++ b/rtc_base/copyonwritebuffer.h
@@ -17,7 +17,6 @@
 #include "rtc_base/buffer.h"
 #include "rtc_base/checks.h"
 #include "rtc_base/refcount.h"
-#include "rtc_base/refcountedobject.h"
 #include "rtc_base/scoped_ref_ptr.h"
 
 namespace rtc {
diff --git a/rtc_base/refcount.h b/rtc_base/refcount.h
index f29d279..a2664f0 100644
--- a/rtc_base/refcount.h
+++ b/rtc_base/refcount.h
@@ -10,6 +10,8 @@
 #ifndef RTC_BASE_REFCOUNT_H_
 #define RTC_BASE_REFCOUNT_H_
 
+#include "rtc_base/refcountedobject.h"
+
 namespace rtc {
 
 // Reference count interface.
diff --git a/rtc_base/refcountedobject_unittest.cc b/rtc_base/refcountedobject_unittest.cc
index 143ca85..688b921 100644
--- a/rtc_base/refcountedobject_unittest.cc
+++ b/rtc_base/refcountedobject_unittest.cc
@@ -12,7 +12,6 @@
 
 #include "rtc_base/gunit.h"
 #include "rtc_base/refcount.h"
-#include "rtc_base/refcountedobject.h"
 
 namespace rtc {
 
diff --git a/rtc_base/rtccertificate.cc b/rtc_base/rtccertificate.cc
index dd6f40a..0c583b3 100644
--- a/rtc_base/rtccertificate.cc
+++ b/rtc_base/rtccertificate.cc
@@ -13,7 +13,6 @@
 #include "rtc_base/rtccertificate.h"
 
 #include "rtc_base/checks.h"
-#include "rtc_base/refcountedobject.h"
 
 namespace rtc {
 
diff --git a/rtc_base/rtccertificategenerator.cc b/rtc_base/rtccertificategenerator.cc
index cacff61..1d99d10 100644
--- a/rtc_base/rtccertificategenerator.cc
+++ b/rtc_base/rtccertificategenerator.cc
@@ -14,7 +14,6 @@
 #include <memory>
 
 #include "rtc_base/checks.h"
-#include "rtc_base/refcountedobject.h"
 #include "rtc_base/sslidentity.h"
 
 namespace rtc {
diff --git a/rtc_base/rtccertificategenerator_unittest.cc b/rtc_base/rtccertificategenerator_unittest.cc
index 4ff6880..c8e1ab3 100644
--- a/rtc_base/rtccertificategenerator_unittest.cc
+++ b/rtc_base/rtccertificategenerator_unittest.cc
@@ -16,7 +16,6 @@
 #include "rtc_base/checks.h"
 #include "rtc_base/gunit.h"
 #include "rtc_base/logging.h"
-#include "rtc_base/refcountedobject.h"
 #include "rtc_base/thread.h"
 
 namespace rtc {
diff --git a/rtc_base/weak_ptr.h b/rtc_base/weak_ptr.h
index 4950dfc..7c1c15c 100644
--- a/rtc_base/weak_ptr.h
+++ b/rtc_base/weak_ptr.h
@@ -16,7 +16,6 @@
 #include <utility>
 
 #include "rtc_base/refcount.h"
-#include "rtc_base/refcountedobject.h"
 #include "rtc_base/scoped_ref_ptr.h"
 #include "rtc_base/sequenced_task_checker.h"
 
diff --git a/test/encoder_settings.cc b/test/encoder_settings.cc
index 673785d..a2549ab 100644
--- a/test/encoder_settings.cc
+++ b/test/encoder_settings.cc
@@ -15,7 +15,6 @@
 #include "modules/video_coding/codecs/h264/include/h264.h"
 #include "modules/video_coding/codecs/vp8/include/vp8.h"
 #include "modules/video_coding/codecs/vp9/include/vp9.h"
-#include "rtc_base/refcountedobject.h"
 #include "test/fake_decoder.h"
 
 namespace webrtc {
diff --git a/test/mock_audio_decoder_factory.h b/test/mock_audio_decoder_factory.h
index bc504d8..6104b06 100644
--- a/test/mock_audio_decoder_factory.h
+++ b/test/mock_audio_decoder_factory.h
@@ -16,7 +16,6 @@
 
 #include "api/audio_codecs/audio_decoder_factory.h"
 #include "api/audio_codecs/builtin_audio_decoder_factory.h"
-#include "rtc_base/refcountedobject.h"
 #include "rtc_base/scoped_ref_ptr.h"
 #include "test/gmock.h"
 
diff --git a/voice_engine/voe_base_unittest.cc b/voice_engine/voe_base_unittest.cc
index 72f2e0a..ef42fba 100644
--- a/voice_engine/voe_base_unittest.cc
+++ b/voice_engine/voe_base_unittest.cc
@@ -12,7 +12,6 @@
 
 #include "modules/audio_device/include/fake_audio_device.h"
 #include "modules/audio_processing/include/mock_audio_processing.h"
-#include "rtc_base/refcountedobject.h"
 #include "test/gtest.h"
 
 namespace webrtc {