Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(892)

Side by Side Diff: third_party/WebKit/Source/web/ChromeClientImpl.cpp

Issue 1922793002: Move deferred commit logic from WebViewImpl to Document. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 if (eventClass == WebEventListenerClass::TouchStartOrMove) { 927 if (eventClass == WebEventListenerClass::TouchStartOrMove) {
928 m_webView->hasTouchEventHandlers(properties != WebEventListenerPrope rties::Nothing || eventListenerProperties(WebEventListenerClass::TouchEndOrCance l) != WebEventListenerProperties::Nothing); 928 m_webView->hasTouchEventHandlers(properties != WebEventListenerPrope rties::Nothing || eventListenerProperties(WebEventListenerClass::TouchEndOrCance l) != WebEventListenerProperties::Nothing);
929 } else if (eventClass == WebEventListenerClass::TouchEndOrCancel) { 929 } else if (eventClass == WebEventListenerClass::TouchEndOrCancel) {
930 m_webView->hasTouchEventHandlers(properties != WebEventListenerPrope rties::Nothing || eventListenerProperties(WebEventListenerClass::TouchStartOrMov e) != WebEventListenerProperties::Nothing); 930 m_webView->hasTouchEventHandlers(properties != WebEventListenerPrope rties::Nothing || eventListenerProperties(WebEventListenerClass::TouchStartOrMov e) != WebEventListenerProperties::Nothing);
931 } 931 }
932 } else { 932 } else {
933 m_webView->hasTouchEventHandlers(true); 933 m_webView->hasTouchEventHandlers(true);
934 } 934 }
935 } 935 }
936 936
937 void ChromeClientImpl::beginLifecycleUpdates()
938 {
939 if (WebLayerTreeView* treeView = m_webView->layerTreeView()) {
940 treeView->setDeferCommits(false);
941 treeView->setNeedsBeginFrame();
942 }
943 }
944
937 WebEventListenerProperties ChromeClientImpl::eventListenerProperties(WebEventLis tenerClass eventClass) const 945 WebEventListenerProperties ChromeClientImpl::eventListenerProperties(WebEventLis tenerClass eventClass) const
938 { 946 {
939 if (WebLayerTreeView* treeView = m_webView->layerTreeView()) 947 if (WebLayerTreeView* treeView = m_webView->layerTreeView())
940 return treeView->eventListenerProperties(eventClass); 948 return treeView->eventListenerProperties(eventClass);
941 return WebEventListenerProperties::Nothing; 949 return WebEventListenerProperties::Nothing;
942 } 950 }
943 951
944 void ChromeClientImpl::setHasScrollEventHandlers(bool hasEventHandlers) 952 void ChromeClientImpl::setHasScrollEventHandlers(bool hasEventHandlers)
945 { 953 {
946 if (WebLayerTreeView* treeView = m_webView->layerTreeView()) 954 if (WebLayerTreeView* treeView = m_webView->layerTreeView())
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 { 1118 {
1111 return adoptPtr(m_webView->scheduler()->createFrameScheduler(blameContext).r elease()); 1119 return adoptPtr(m_webView->scheduler()->createFrameScheduler(blameContext).r elease());
1112 } 1120 }
1113 1121
1114 double ChromeClientImpl::lastFrameTimeMonotonic() const 1122 double ChromeClientImpl::lastFrameTimeMonotonic() const
1115 { 1123 {
1116 return m_webView->lastFrameTimeMonotonic(); 1124 return m_webView->lastFrameTimeMonotonic();
1117 } 1125 }
1118 1126
1119 } // namespace blink 1127 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698