DescriptionReduce calling count of UpdateAppState()
When web page is loading, a lot of TabChangedAt() is called. That means a
lot of UpdateAppState() is called, too.
For example, loading google drive site causes almost more than 70 calling
of TabChangedAt().
To replace TabChangedAt(), WebContentsObserver is used.
TabDetachedAt() is replaced with TabClosingAt().
When tab is detached, there are two cases.
The one case is tab is attached to other tab strip model. In this case,
its LauncherItem is updated by ActiveTabChanged().
The other case is tab is closed. In this case TabClosingAt() can handle LauncherItem status.
TabReplacedAt() is only used when tab is discarded when low memory condition is occurred.
In this case, updating the launcher item status is not good because user don't need to know
about discarding a tab. Also it is reloaded again when user selects discarded tab.
R=skuhne@chromium.org
BUG=NONE
TEST=browser_tests, unit_tests
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=226406
Patch Set 1 #
Total comments: 1
Patch Set 2 : Monitor active tab's webcontents by using WebContenetsObserver. #
Total comments: 10
Patch Set 3 : self refactoring #Patch Set 4 : #
Total comments: 16
Patch Set 5 : #Patch Set 6 : Add unittests for tab drag and drop. #Patch Set 7 : Rebased #
Total comments: 6
Patch Set 8 : #
Messages
Total messages: 16 (0 generated)
|