Move optional.h to webrtc/api/
We use Optional in our public API, so its header should be in
webrtc/api/.
BUG=webrtc:8205
Review-Url: https://codereview.webrtc.org/3011943002
Cr-Commit-Position: refs/heads/master@{#19693}
diff --git a/webrtc/modules/video_coding/BUILD.gn b/webrtc/modules/video_coding/BUILD.gn
index 3af09ea..3bf221b 100644
--- a/webrtc/modules/video_coding/BUILD.gn
+++ b/webrtc/modules/video_coding/BUILD.gn
@@ -96,6 +96,7 @@
":webrtc_vp9",
"..:module_api",
"../..:webrtc_common",
+ "../../api:optional",
"../../call:video_stream_api",
"../../common_video",
"../../rtc_base:rtc_base",
@@ -136,6 +137,7 @@
deps = [
"..:module_api",
"../..:webrtc_common",
+ "../../api:optional",
"../../api/video_codecs:video_codecs_api",
"../../common_video",
"../../modules/rtp_rtcp:rtp_rtcp",
@@ -232,6 +234,7 @@
":video_coding_utility",
"..:module_api",
"../..:webrtc_common",
+ "../../api:optional",
"../../api/video_codecs:video_codecs_api",
"../../common_video",
"../../rtc_base:rtc_base_approved",
@@ -438,6 +441,7 @@
":webrtc_h264",
":webrtc_vp8",
":webrtc_vp9",
+ "../../api:optional",
"../../api:video_frame_api",
"../../common_video:common_video",
"../../rtc_base:rtc_base_approved",
diff --git a/webrtc/modules/video_coding/codecs/vp8/default_temporal_layers.h b/webrtc/modules/video_coding/codecs/vp8/default_temporal_layers.h
index 4762f87..985874b 100644
--- a/webrtc/modules/video_coding/codecs/vp8/default_temporal_layers.h
+++ b/webrtc/modules/video_coding/codecs/vp8/default_temporal_layers.h
@@ -16,7 +16,7 @@
#include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h"
-#include "webrtc/rtc_base/optional.h"
+#include "webrtc/api/optional.h"
namespace webrtc {
diff --git a/webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc b/webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc
index 310fa3c..3eb04be 100644
--- a/webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc
+++ b/webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc
@@ -12,13 +12,13 @@
#include <memory>
+#include "webrtc/api/optional.h"
#include "webrtc/api/video/i420_buffer.h"
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
#include "webrtc/modules/video_coding/codecs/test/video_codec_test.h"
#include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
#include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h"
#include "webrtc/rtc_base/checks.h"
-#include "webrtc/rtc_base/optional.h"
#include "webrtc/rtc_base/timeutils.h"
#include "webrtc/test/field_trial.h"
#include "webrtc/test/frame_utils.h"
diff --git a/webrtc/modules/video_coding/frame_object.h b/webrtc/modules/video_coding/frame_object.h
index 90c1c00..69ab6f0 100644
--- a/webrtc/modules/video_coding/frame_object.h
+++ b/webrtc/modules/video_coding/frame_object.h
@@ -11,10 +11,10 @@
#ifndef WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_
#define WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_
+#include "webrtc/api/optional.h"
#include "webrtc/common_types.h"
#include "webrtc/modules/include/module_common_types.h"
#include "webrtc/modules/video_coding/encoded_frame.h"
-#include "webrtc/rtc_base/optional.h"
namespace webrtc {
namespace video_coding {
diff --git a/webrtc/modules/video_coding/generic_encoder.cc b/webrtc/modules/video_coding/generic_encoder.cc
index adc4365..339e1b5 100644
--- a/webrtc/modules/video_coding/generic_encoder.cc
+++ b/webrtc/modules/video_coding/generic_encoder.cc
@@ -12,13 +12,13 @@
#include <vector>
+#include "webrtc/api/optional.h"
#include "webrtc/api/video/i420_buffer.h"
#include "webrtc/modules/pacing/alr_detector.h"
#include "webrtc/modules/video_coding/encoded_frame.h"
#include "webrtc/modules/video_coding/media_optimization.h"
#include "webrtc/rtc_base/checks.h"
#include "webrtc/rtc_base/logging.h"
-#include "webrtc/rtc_base/optional.h"
#include "webrtc/rtc_base/timeutils.h"
#include "webrtc/rtc_base/trace_event.h"
#include "webrtc/system_wrappers/include/field_trial.h"
diff --git a/webrtc/modules/video_coding/sequence_number_util.h b/webrtc/modules/video_coding/sequence_number_util.h
index 05f3367..3e7d64a 100644
--- a/webrtc/modules/video_coding/sequence_number_util.h
+++ b/webrtc/modules/video_coding/sequence_number_util.h
@@ -14,8 +14,8 @@
#include <limits>
#include <type_traits>
+#include "webrtc/api/optional.h"
#include "webrtc/rtc_base/mod_ops.h"
-#include "webrtc/rtc_base/optional.h"
#include "webrtc/rtc_base/safe_compare.h"
namespace webrtc {
diff --git a/webrtc/modules/video_coding/utility/moving_average.h b/webrtc/modules/video_coding/utility/moving_average.h
index bc31cd5..0f2c4cc 100644
--- a/webrtc/modules/video_coding/utility/moving_average.h
+++ b/webrtc/modules/video_coding/utility/moving_average.h
@@ -13,7 +13,7 @@
#include <vector>
-#include "webrtc/rtc_base/optional.h"
+#include "webrtc/api/optional.h"
namespace webrtc {
class MovingAverage {
diff --git a/webrtc/modules/video_coding/utility/quality_scaler.h b/webrtc/modules/video_coding/utility/quality_scaler.h
index 690d1bc..25d39cc 100644
--- a/webrtc/modules/video_coding/utility/quality_scaler.h
+++ b/webrtc/modules/video_coding/utility/quality_scaler.h
@@ -13,10 +13,10 @@
#include <utility>
+#include "webrtc/api/optional.h"
#include "webrtc/api/video_codecs/video_encoder.h"
#include "webrtc/common_types.h"
#include "webrtc/modules/video_coding/utility/moving_average.h"
-#include "webrtc/rtc_base/optional.h"
#include "webrtc/rtc_base/sequenced_task_checker.h"
namespace webrtc {