Reland "Compositing-based frame throttling."

This relands commit d48bbee59945e6ea45e2f5816a270cf90af73ae5.

A number of Asan tests failed on the reverted commit due to the use of
ScopedMultiSourceObservation without properly removing the sources
(WindowTreeHost*) when they go out of scope at places other than when
the hosts are not deleted from WindowHostManager. This commit simplifies
the observer pattern used on FrameThrottlingController as
aura::WindowTreeHostObserver.

Bug: 1143872,1179740,1179695
Change-Id: Ifaf903af7c824c5609ada25013bd4977e5086910
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2705310
Commit-Queue: Jun Liu <[email protected]>
Auto-Submit: Jun Liu <[email protected]>
Reviewed-by: Mitsuru Oshima <[email protected]>
Reviewed-by: kylechar <[email protected]>
Reviewed-by: Scott Violet <[email protected]>
Reviewed-by: Will Harris <[email protected]>
Cr-Commit-Position: refs/heads/master@{#857938}
diff --git a/cc/BUILD.gn b/cc/BUILD.gn
index cbc570b..3465bf70 100644
--- a/cc/BUILD.gn
+++ b/cc/BUILD.gn
@@ -412,6 +412,8 @@
     "trees/target_property.h",
     "trees/task_runner_provider.cc",
     "trees/task_runner_provider.h",
+    "trees/throttle_decider.cc",
+    "trees/throttle_decider.h",
     "trees/transform_node.cc",
     "trees/transform_node.h",
     "trees/tree_synchronizer.cc",
@@ -792,6 +794,7 @@
     "trees/property_tree_builder_unittest.cc",
     "trees/property_tree_unittest.cc",
     "trees/swap_promise_manager_unittest.cc",
+    "trees/throttle_decider_unittest.cc",
     "trees/tree_synchronizer_unittest.cc",
     "trees/ukm_manager_unittest.cc",