Bug 1358805 - part 3: Keep the toolbar state between UI thread and compositor thread consistent once IPC is open r=kats

MozReview-Commit-ID: H7qrShryomi
This commit is contained in:
Randall Barker 2017-04-25 12:50:59 -07:00
Родитель 7752cdc25d
Коммит 01ebd7c57f
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -154,6 +154,11 @@ public class DynamicToolbarAnimator {
private void dumpStateToCompositor() {
if ((mCompositor != null) && mCompositorControllerOpen) {
mCompositor.setMaxToolbarHeight(mMaxToolbarHeight);
if ((mToolbarChromeProxy != null) && mToolbarChromeProxy.isToolbarChromeVisible()) {
mCompositor.sendToolbarAnimatorMessage(LayerView.REQUEST_SHOW_TOOLBAR_IMMEDIATELY);
} else {
mCompositor.sendToolbarAnimatorMessage(LayerView.REQUEST_HIDE_TOOLBAR_IMMEDIATELY);
}
for (PinReason reason : pinFlags) {
mCompositor.setPinned(true, reason.mValue);
}