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

Side by Side 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, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/renderer/compositor_bindings/web_layer_impl.h" 5 #include "webkit/renderer/compositor_bindings/web_layer_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "cc/animation/animation.h" 9 #include "cc/animation/animation.h"
10 #include "cc/base/region.h" 10 #include "cc/base/region.h"
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 const WebKit::WebLayerPositionConstraint& constraint) { 344 const WebKit::WebLayerPositionConstraint& constraint) {
345 layer_->SetPositionConstraint(ToLayerPositionConstraint(constraint)); 345 layer_->SetPositionConstraint(ToLayerPositionConstraint(constraint));
346 } 346 }
347 347
348 WebKit::WebLayerPositionConstraint WebLayerImpl::positionConstraint() const { 348 WebKit::WebLayerPositionConstraint WebLayerImpl::positionConstraint() const {
349 return ToWebLayerPositionConstraint(layer_->position_constraint()); 349 return ToWebLayerPositionConstraint(layer_->position_constraint());
350 } 350 }
351 351
352 void WebLayerImpl::setScrollClient( 352 void WebLayerImpl::setScrollClient(
353 WebKit::WebLayerScrollClient* scroll_client) { 353 WebKit::WebLayerScrollClient* scroll_client) {
354 layer_->set_did_scroll_callback( 354 if (scroll_client) {
355 base::Bind(&WebKit::WebLayerScrollClient::didScroll, 355 layer_->set_did_scroll_callback(
356 base::Unretained(scroll_client))); 356 base::Bind(&WebKit::WebLayerScrollClient::didScroll,
357 base::Unretained(scroll_client)));
358 } else {
359 layer_->set_did_scroll_callback(base::Closure());
360 }
357 } 361 }
358 362
359 bool WebLayerImpl::isOrphan() const { return !layer_->layer_tree_host(); } 363 bool WebLayerImpl::isOrphan() const { return !layer_->layer_tree_host(); }
360 364
361 Layer* WebLayerImpl::layer() const { return layer_.get(); } 365 Layer* WebLayerImpl::layer() const { return layer_.get(); }
362 366
363 } // namespace webkit 367 } // namespace webkit
OLDNEW
« 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