| 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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 void WebLayerImpl::SetStickyPositionConstraint( | 410 void WebLayerImpl::SetStickyPositionConstraint( |
| 411 const blink::WebLayerStickyPositionConstraint& constraint) { | 411 const blink::WebLayerStickyPositionConstraint& constraint) { |
| 412 layer_->SetStickyPositionConstraint(ToStickyPositionConstraint(constraint)); | 412 layer_->SetStickyPositionConstraint(ToStickyPositionConstraint(constraint)); |
| 413 } | 413 } |
| 414 blink::WebLayerStickyPositionConstraint WebLayerImpl::StickyPositionConstraint() | 414 blink::WebLayerStickyPositionConstraint WebLayerImpl::StickyPositionConstraint() |
| 415 const { | 415 const { |
| 416 return ToWebLayerStickyPositionConstraint( | 416 return ToWebLayerStickyPositionConstraint( |
| 417 layer_->sticky_position_constraint()); | 417 layer_->sticky_position_constraint()); |
| 418 } | 418 } |
| 419 | 419 |
| 420 void WebLayerImpl::SetOffsetForStickyPosition(const blink::WebSize& offset) { | |
| 421 layer_->SetOffsetForStickyPositionFromMainThread(offset); | |
| 422 } | |
| 423 | |
| 424 blink::WebSize WebLayerImpl::OffsetForStickyPosition() const { | |
| 425 return layer_->offset_for_sticky_position_from_main_thread(); | |
| 426 } | |
| 427 | |
| 428 void WebLayerImpl::SetScrollClient(blink::WebLayerScrollClient* scroll_client) { | 420 void WebLayerImpl::SetScrollClient(blink::WebLayerScrollClient* scroll_client) { |
| 429 if (scroll_client) { | 421 if (scroll_client) { |
| 430 layer_->set_did_scroll_callback( | 422 layer_->set_did_scroll_callback( |
| 431 base::Bind(&blink::WebLayerScrollClient::DidScroll, | 423 base::Bind(&blink::WebLayerScrollClient::DidScroll, |
| 432 base::Unretained(scroll_client))); | 424 base::Unretained(scroll_client))); |
| 433 } else { | 425 } else { |
| 434 layer_->set_did_scroll_callback( | 426 layer_->set_did_scroll_callback( |
| 435 base::Callback<void(const gfx::ScrollOffset&)>()); | 427 base::Callback<void(const gfx::ScrollOffset&)>()); |
| 436 } | 428 } |
| 437 } | 429 } |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 | 480 |
| 489 void WebLayerImpl::SetHasWillChangeTransformHint(bool has_will_change) { | 481 void WebLayerImpl::SetHasWillChangeTransformHint(bool has_will_change) { |
| 490 layer_->SetHasWillChangeTransformHint(has_will_change); | 482 layer_->SetHasWillChangeTransformHint(has_will_change); |
| 491 } | 483 } |
| 492 | 484 |
| 493 void WebLayerImpl::ShowScrollbars() { | 485 void WebLayerImpl::ShowScrollbars() { |
| 494 layer_->ShowScrollbars(); | 486 layer_->ShowScrollbars(); |
| 495 } | 487 } |
| 496 | 488 |
| 497 } // namespace cc_blink | 489 } // namespace cc_blink |
| OLD | NEW |