From d25fa78dafd06c90b930cf25d00d1ee7ed138a76 Mon Sep 17 00:00:00 2001 From: Niels Moller Date: Tue, 3 Oct 2017 09:48:52 +0000 Subject: [PATCH] Revert "Make rtc_base/refcount.h self contained, not including refcountedobject.h." This reverts commit b7239a9dc825ddb25dbc800aed3a065163b9a10e. Reason for revert: Broke chromium mac build, compilation failures on content/renderer/media/webrtc/webrtc_video_frame_adapter.h. 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 > Commit-Queue: Niels Moller > Cr-Commit-Position: refs/heads/master@{#20106} TBR=kwiberg@webrtc.org,nisse@webrtc.org Change-Id: I7334597cc8979ba9cfaff526967084349ef27f3c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:8270 Reviewed-on: https://webrtc-review.googlesource.com/5800 Reviewed-by: Niels Moller Commit-Queue: Niels Moller Cr-Commit-Position: refs/heads/master@{#20107} --- api/audio_codecs/audio_decoder_factory_template.h | 1 - api/audio_codecs/audio_encoder_factory_template.h | 1 - api/proxy.h | 1 - api/stats/rtcstatsreport.h | 1 - api/statstypes.cc | 1 - common_video/include/i420_buffer_pool.h | 1 - modules/audio_coding/acm2/audio_coding_module_unittest.cc | 1 - modules/audio_coding/neteq/decoder_database_unittest.cc | 1 - modules/audio_device/audio_device_impl.cc | 1 - modules/audio_mixer/audio_mixer_impl.cc | 1 - modules/audio_processing/audio_processing_impl.cc | 1 - modules/audio_processing/audio_processing_unittest.cc | 1 - modules/desktop_capture/shared_desktop_frame.h | 1 - modules/video_capture/external/video_capture_external.cc | 1 - modules/video_capture/linux/video_capture_linux.cc | 1 - modules/video_capture/objc/video_capture.mm | 1 - modules/video_capture/video_capture_impl.cc | 1 - modules/video_capture/windows/video_capture_factory_windows.cc | 1 - modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.cc | 1 - modules/video_coding/video_codec_initializer_unittest.cc | 1 - pc/audiotrack.cc | 1 - pc/mediastream.cc | 1 - pc/test/fakeaudiocapturemodule.cc | 1 - pc/videotrack.cc | 1 - rtc_base/bind_unittest.cc | 1 - rtc_base/callback.h | 3 +-- rtc_base/callback.h.pump | 3 +-- rtc_base/copyonwritebuffer.h | 1 - rtc_base/refcount.h | 2 ++ rtc_base/refcountedobject_unittest.cc | 1 - rtc_base/rtccertificate.cc | 1 - rtc_base/rtccertificategenerator.cc | 1 - rtc_base/rtccertificategenerator_unittest.cc | 1 - rtc_base/weak_ptr.h | 1 - test/encoder_settings.cc | 1 - test/mock_audio_decoder_factory.h | 1 - voice_engine/voe_base_unittest.cc | 1 - 37 files changed, 4 insertions(+), 38 deletions(-) diff --git a/api/audio_codecs/audio_decoder_factory_template.h b/api/audio_codecs/audio_decoder_factory_template.h index a1933aa2b4..eb13e9ffca 100644 --- a/api/audio_codecs/audio_decoder_factory_template.h +++ b/api/audio_codecs/audio_decoder_factory_template.h @@ -15,7 +15,6 @@ #include #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 252a9bd618..8df582e274 100644 --- a/api/audio_codecs/audio_encoder_factory_template.h +++ b/api/audio_codecs/audio_encoder_factory_template.h @@ -15,7 +15,6 @@ #include #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 175c6b7e0a..c597165315 100644 --- a/api/proxy.h +++ b/api/proxy.h @@ -56,7 +56,6 @@ #include #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 ee56b35d06..027041aef8 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 940fb73c84..f1a11304a8 100644 --- a/api/statstypes.cc +++ b/api/statstypes.cc @@ -13,7 +13,6 @@ #include #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 863eb10180..f43a948331 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 6d0c37efb5..a010619b7e 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 626420af88..be3c0b7ab8 100644 --- a/modules/audio_coding/neteq/decoder_database_unittest.cc +++ b/modules/audio_coding/neteq/decoder_database_unittest.cc @@ -16,7 +16,6 @@ #include #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 31b05a9f81..820d5f6a46 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 9ff5774ac6..51f6658725 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 fd469eac3c..99cd082e3e 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 2b1393fad4..7cd2c95e01 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 f70508cee1..1f01220320 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 3252178d9a..cd85071ea3 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 80810f20a4..be8e64e6d2 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 6dd2fd6e62..4f9c2f3e86 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 1f40ee7da4..4d67010108 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 52a3cb512b..069f463c32 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 a7a03e5efd..0e819231a5 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 48bf466863..99239c59ec 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 408399122a..8e24f0b376 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 0d6fcdab1e..0e24ee6cee 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 5a962df47d..ffee283023 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 718c0d6fee..00adb3db1d 100644 --- a/pc/videotrack.cc +++ b/pc/videotrack.cc @@ -9,7 +9,6 @@ */ #include "pc/videotrack.h" -#include "rtc_base/refcountedobject.h" #include diff --git a/rtc_base/bind_unittest.cc b/rtc_base/bind_unittest.cc index 8703be4adf..7028ced351 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 0e035ad6a0..1472b25a5d 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 2c40eabb07..383fc19c76 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 c4bba874ad..bdfe3937c7 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 f29d27990d..a2664f0f8b 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 143ca85c44..688b9215c1 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 dd6f40a6af..0c583b3db2 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 cacff61e35..1d99d10ffa 100644 --- a/rtc_base/rtccertificategenerator.cc +++ b/rtc_base/rtccertificategenerator.cc @@ -14,7 +14,6 @@ #include #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 4ff6880567..c8e1ab38c2 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 4950dfc19e..7c1c15cdf9 100644 --- a/rtc_base/weak_ptr.h +++ b/rtc_base/weak_ptr.h @@ -16,7 +16,6 @@ #include #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 673785d468..a2549ab4d8 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 bc504d871e..6104b067a5 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 72f2e0a396..ef42fbab40 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 {