diff --git a/pc/BUILD.gn b/pc/BUILD.gn index bc8234af42..da78a25158 100644 --- a/pc/BUILD.gn +++ b/pc/BUILD.gn @@ -865,7 +865,6 @@ rtc_source_set("peer_connection") { ":usage_pattern", ":webrtc_session_description_factory", "../api:async_dns_resolver", - "../api:audio_options_api", "../api:libjingle_logging_api", "../api:libjingle_peerconnection_api", "../api:media_stream_interface", @@ -876,6 +875,7 @@ rtc_source_set("peer_connection") { "../api:rtp_transceiver_direction", "../api:scoped_refptr", "../api:sequence_checker", + "../api:webrtc_key_value_config", "../api/adaptation:resource_adaptation_api", "../api/crypto:options", "../api/rtc_event_log:rtc_event_log", diff --git a/pc/peer_connection.cc b/pc/peer_connection.cc index ec6bef32f7..fb1f86c007 100644 --- a/pc/peer_connection.cc +++ b/pc/peer_connection.cc @@ -17,7 +17,6 @@ #include #include #include -#include #include #include "absl/algorithm/container.h" @@ -26,7 +25,6 @@ #include "api/jsep_ice_candidate.h" #include "api/rtp_parameters.h" #include "api/rtp_transceiver_direction.h" -#include "api/transport/webrtc_key_value_config.h" #include "api/uma_metrics.h" #include "api/video/video_codec_constants.h" #include "call/audio_state.h" diff --git a/pc/peer_connection.h b/pc/peer_connection.h index a6e4510b47..95bdfba3b7 100644 --- a/pc/peer_connection.h +++ b/pc/peer_connection.h @@ -18,14 +18,11 @@ #include #include #include -#include #include #include "absl/types/optional.h" #include "api/adaptation/resource.h" #include "api/async_dns_resolver.h" -#include "api/async_resolver_factory.h" -#include "api/audio_options.h" #include "api/candidate.h" #include "api/crypto/crypto_options.h" #include "api/data_channel_interface.h" @@ -34,12 +31,10 @@ #include "api/jsep.h" #include "api/media_stream_interface.h" #include "api/media_types.h" -#include "api/packet_socket_factory.h" #include "api/peer_connection_interface.h" #include "api/rtc_error.h" #include "api/rtc_event_log/rtc_event_log.h" #include "api/rtc_event_log_output.h" -#include "api/rtp_parameters.h" #include "api/rtp_receiver_interface.h" #include "api/rtp_sender_interface.h" #include "api/rtp_transceiver_interface.h" @@ -53,15 +48,12 @@ #include "api/transport/data_channel_transport_interface.h" #include "api/transport/enums.h" #include "api/turn_customizer.h" -#include "api/video/video_bitrate_allocator_factory.h" +#include "api/webrtc_key_value_config.h" #include "call/call.h" -#include "media/base/media_channel.h" -#include "media/base/media_engine.h" #include "p2p/base/ice_transport_internal.h" #include "p2p/base/port.h" #include "p2p/base/port_allocator.h" #include "p2p/base/transport_description.h" -#include "pc/channel.h" #include "pc/channel_interface.h" #include "pc/channel_manager.h" #include "pc/connection_context.h" @@ -72,23 +64,18 @@ #include "pc/peer_connection_internal.h" #include "pc/peer_connection_message_handler.h" #include "pc/rtc_stats_collector.h" -#include "pc/rtp_receiver.h" -#include "pc/rtp_sender.h" #include "pc/rtp_transceiver.h" #include "pc/rtp_transmission_manager.h" #include "pc/rtp_transport_internal.h" #include "pc/sctp_data_channel.h" -#include "pc/sctp_transport.h" #include "pc/sdp_offer_answer.h" #include "pc/session_description.h" #include "pc/stats_collector.h" -#include "pc/stream_collection.h" #include "pc/transceiver_list.h" #include "pc/transport_stats.h" #include "pc/usage_pattern.h" #include "rtc_base/checks.h" #include "rtc_base/copy_on_write_buffer.h" -#include "rtc_base/network/sent_packet.h" #include "rtc_base/rtc_certificate.h" #include "rtc_base/ssl_certificate.h" #include "rtc_base/ssl_stream_adapter.h" @@ -96,7 +83,6 @@ #include "rtc_base/third_party/sigslot/sigslot.h" #include "rtc_base/thread.h" #include "rtc_base/thread_annotations.h" -#include "rtc_base/unique_id_generator.h" #include "rtc_base/weak_ptr.h" namespace webrtc { diff --git a/tools_webrtc/iwyu/apply-iwyu b/tools_webrtc/iwyu/apply-iwyu index 7f2809b769..794756ba47 100755 --- a/tools_webrtc/iwyu/apply-iwyu +++ b/tools_webrtc/iwyu/apply-iwyu @@ -17,7 +17,7 @@ # Set this to 1 to get more debug information. # Set this to 2 to also get a dump of the iwyu tool output. -DEBUG=2 +DEBUG=0 set -e if [ $DEBUG -gt 0 ]; then @@ -26,6 +26,7 @@ fi IWYU_TOOL="${IWYU_TOOL:-/usr/bin/iwyu_tool}" FIX_INCLUDE="${FIX_INCLUDE:-/usr/bin/fix_include}" +FIX_INCLUDE_ARGS='' IWYU_TOOL_DIR="${IWYU_TOOL_DIR:-tools_webrtc/iwyu}" COMPILE_COMMANDS='' @@ -34,9 +35,22 @@ error() { exit 1 } -while getopts 'c:r' opts; do +usage() { + echo "Usage: $0 [ -c compile-commands-file.json ] [-r] file.cc" + echo "Runs the IWYU and fix-include on a CC file and its associated .h file" + echo "Arguments:" + echo " -c compile-commands: Compiler command file" + echo " -r : Remove non-required includes from .h file" + echo " -h : Print this help message" + echo "(default command file: out/Default/compile_commands.json - this" + echo "will be generated if not present" +} + +while getopts 'c:rh' opts; do case "${opts}" in c) COMPILE_COMMANDS="${OPTARG}" ;; + r) FIX_INCLUDE_ARGS="${FIX_INCLUDE_ARGS} --nosafe_headers" ;; + h) usage; exit 1 ;; *) error "Unexpected option ${opts}" ;; esac done @@ -84,7 +98,7 @@ else # In compile_commands.json, the file name is recorded # as a relative path to the build directory. pushd "$(dirname "$COMPILE_COMMANDS")" || error "pushd failed" - "$FIX_INCLUDE" < /tmp/includefixes$$ || echo "Some files modified" + "$FIX_INCLUDE" $FIX_INCLUDE_ARGS < /tmp/includefixes$$ || echo "Some files modified" popd rm /tmp/includefixes$$ fi