| 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 <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 for (cc::Region::Iterator region_rects(layer_->touch_event_handler_region()); | 390 for (cc::Region::Iterator region_rects(layer_->touch_event_handler_region()); |
| 391 region_rects.has_rect(); | 391 region_rects.has_rect(); |
| 392 region_rects.next()) { | 392 region_rects.next()) { |
| 393 result[i] = region_rects.rect(); | 393 result[i] = region_rects.rect(); |
| 394 ++i; | 394 ++i; |
| 395 } | 395 } |
| 396 return result; | 396 return result; |
| 397 } | 397 } |
| 398 | 398 |
| 399 static_assert(static_cast<ScrollBlocksOn>(blink::WebScrollBlocksOnNone) == | 399 static_assert(static_cast<ScrollBlocksOn>(blink::WebScrollBlocksOnNone) == |
| 400 SCROLL_BLOCKS_ON_NONE, | 400 ScrollBlocksOnNone, |
| 401 "ScrollBlocksOn and WebScrollBlocksOn enums must match"); | 401 "ScrollBlocksOn and WebScrollBlocksOn enums must match"); |
| 402 static_assert(static_cast<ScrollBlocksOn>(blink::WebScrollBlocksOnStartTouch) == | 402 static_assert(static_cast<ScrollBlocksOn>(blink::WebScrollBlocksOnStartTouch) == |
| 403 SCROLL_BLOCKS_ON_START_TOUCH, | 403 ScrollBlocksOnStartTouch, |
| 404 "ScrollBlocksOn and WebScrollBlocksOn enums must match"); | 404 "ScrollBlocksOn and WebScrollBlocksOn enums must match"); |
| 405 static_assert(static_cast<ScrollBlocksOn>(blink::WebScrollBlocksOnWheelEvent) == | 405 static_assert(static_cast<ScrollBlocksOn>(blink::WebScrollBlocksOnWheelEvent) == |
| 406 SCROLL_BLOCKS_ON_WHEEL_EVENT, | 406 ScrollBlocksOnWheelEvent, |
| 407 "ScrollBlocksOn and WebScrollBlocksOn enums must match"); | 407 "ScrollBlocksOn and WebScrollBlocksOn enums must match"); |
| 408 static_assert( | 408 static_assert( |
| 409 static_cast<ScrollBlocksOn>(blink::WebScrollBlocksOnScrollEvent) == | 409 static_cast<ScrollBlocksOn>(blink::WebScrollBlocksOnScrollEvent) == |
| 410 SCROLL_BLOCKS_ON_SCROLL_EVENT, | 410 ScrollBlocksOnScrollEvent, |
| 411 "ScrollBlocksOn and WebScrollBlocksOn enums must match"); | 411 "ScrollBlocksOn and WebScrollBlocksOn enums must match"); |
| 412 | 412 |
| 413 void WebLayerImpl::setScrollBlocksOn(blink::WebScrollBlocksOn blocks) { | 413 void WebLayerImpl::setScrollBlocksOn(blink::WebScrollBlocksOn blocks) { |
| 414 layer_->SetScrollBlocksOn(static_cast<ScrollBlocksOn>(blocks)); | 414 layer_->SetScrollBlocksOn(static_cast<ScrollBlocksOn>(blocks)); |
| 415 } | 415 } |
| 416 | 416 |
| 417 blink::WebScrollBlocksOn WebLayerImpl::scrollBlocksOn() const { | 417 blink::WebScrollBlocksOn WebLayerImpl::scrollBlocksOn() const { |
| 418 return static_cast<blink::WebScrollBlocksOn>(layer_->scroll_blocks_on()); | 418 return static_cast<blink::WebScrollBlocksOn>(layer_->scroll_blocks_on()); |
| 419 } | 419 } |
| 420 | 420 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 if (parent) | 514 if (parent) |
| 515 clip_parent = static_cast<WebLayerImpl*>(parent)->layer(); | 515 clip_parent = static_cast<WebLayerImpl*>(parent)->layer(); |
| 516 layer_->SetClipParent(clip_parent); | 516 layer_->SetClipParent(clip_parent); |
| 517 } | 517 } |
| 518 | 518 |
| 519 Layer* WebLayerImpl::layer() const { | 519 Layer* WebLayerImpl::layer() const { |
| 520 return layer_.get(); | 520 return layer_.get(); |
| 521 } | 521 } |
| 522 | 522 |
| 523 } // namespace cc_blink | 523 } // namespace cc_blink |
| OLD | NEW |