cc: Fix infinite BeginFrame that Scheduler causes.

REGRESSION(r206955): Remove the chance to disable SetNeedsBeginFrame.

r206955 made SetNeedsBeginFrame be called proactively, but the proactive condition mostly was true.

This issue makes proactive_begin_frame_wanted condition more restrict.
There are two changes.
1. Do not be proactive when invisible.
2. Do not be proactive when throttling frame production.

This patch is mostly based on what Brian Anderson consults.

BUG=253543

Review URL: https://chromiumcodereview.appspot.com/17587014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208662 0039d316-1c4b-4281-b951-d872f2087c98
5 files changed