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

Unified Diff: webkit/renderer/compositor_bindings/web_layer_impl.cc

Issue 18348021: Allow unsetting scroll client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/renderer/compositor_bindings/web_layer_impl.cc
diff --git a/webkit/renderer/compositor_bindings/web_layer_impl.cc b/webkit/renderer/compositor_bindings/web_layer_impl.cc
index 4f3a3b8a93e5666641c4f458aff90459f31f37a8..4969077605d862dec49127fc7684750e36b25e19 100644
--- a/webkit/renderer/compositor_bindings/web_layer_impl.cc
+++ b/webkit/renderer/compositor_bindings/web_layer_impl.cc
@@ -351,9 +351,13 @@ WebKit::WebLayerPositionConstraint WebLayerImpl::positionConstraint() const {
void WebLayerImpl::setScrollClient(
WebKit::WebLayerScrollClient* scroll_client) {
- layer_->set_did_scroll_callback(
- base::Bind(&WebKit::WebLayerScrollClient::didScroll,
- base::Unretained(scroll_client)));
+ if (scroll_client) {
+ layer_->set_did_scroll_callback(
+ base::Bind(&WebKit::WebLayerScrollClient::didScroll,
+ base::Unretained(scroll_client)));
+ } else {
+ layer_->set_did_scroll_callback(base::Closure());
+ }
}
bool WebLayerImpl::isOrphan() const { return !layer_->layer_tree_host(); }
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698