OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "cc/blink/web_layer_impl.h" | 5 #include "cc/blink/web_layer_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <utility> | 10 #include <utility> |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 return ToWebLayerStickyPositionConstraint( | 409 return ToWebLayerStickyPositionConstraint( |
410 layer_->sticky_position_constraint()); | 410 layer_->sticky_position_constraint()); |
411 } | 411 } |
412 | 412 |
413 void WebLayerImpl::setScrollClient(blink::WebLayerScrollClient* scroll_client) { | 413 void WebLayerImpl::setScrollClient(blink::WebLayerScrollClient* scroll_client) { |
414 if (scroll_client) { | 414 if (scroll_client) { |
415 layer_->set_did_scroll_callback( | 415 layer_->set_did_scroll_callback( |
416 base::Bind(&blink::WebLayerScrollClient::didScroll, | 416 base::Bind(&blink::WebLayerScrollClient::didScroll, |
417 base::Unretained(scroll_client))); | 417 base::Unretained(scroll_client))); |
418 } else { | 418 } else { |
419 layer_->set_did_scroll_callback(base::Closure()); | 419 layer_->set_did_scroll_callback( |
| 420 base::Callback<void(const gfx::ScrollOffset&)>()); |
420 } | 421 } |
421 } | 422 } |
422 | 423 |
423 void WebLayerImpl::setLayerClient(cc::LayerClient* client) { | 424 void WebLayerImpl::setLayerClient(cc::LayerClient* client) { |
424 layer_->SetLayerClient(client); | 425 layer_->SetLayerClient(client); |
425 } | 426 } |
426 | 427 |
427 const cc::Layer* WebLayerImpl::ccLayer() const { | 428 const cc::Layer* WebLayerImpl::ccLayer() const { |
428 return layer_.get(); | 429 return layer_.get(); |
429 } | 430 } |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 | 477 |
477 void WebLayerImpl::setPreferredRasterBounds(const WebSize& bounds) { | 478 void WebLayerImpl::setPreferredRasterBounds(const WebSize& bounds) { |
478 layer_->SetPreferredRasterBounds(bounds); | 479 layer_->SetPreferredRasterBounds(bounds); |
479 } | 480 } |
480 | 481 |
481 void WebLayerImpl::clearPreferredRasterBounds() { | 482 void WebLayerImpl::clearPreferredRasterBounds() { |
482 layer_->ClearPreferredRasterBounds(); | 483 layer_->ClearPreferredRasterBounds(); |
483 } | 484 } |
484 | 485 |
485 } // namespace cc_blink | 486 } // namespace cc_blink |
OLD | NEW |