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

Side by Side Diff: cc/blink/web_layer_impl.cc

Issue 1646603004: Move scroll event handlers from layer to layer tree view. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_cc_listeners
Patch Set: Rebase Created 4 years, 10 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
« no previous file with comments | « cc/blink/web_layer_impl.h ('k') | cc/debug/debug_rect_history.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 } 313 }
314 314
315 bool WebLayerImpl::userScrollableHorizontal() const { 315 bool WebLayerImpl::userScrollableHorizontal() const {
316 return layer_->user_scrollable_horizontal(); 316 return layer_->user_scrollable_horizontal();
317 } 317 }
318 318
319 bool WebLayerImpl::userScrollableVertical() const { 319 bool WebLayerImpl::userScrollableVertical() const {
320 return layer_->user_scrollable_vertical(); 320 return layer_->user_scrollable_vertical();
321 } 321 }
322 322
323 void WebLayerImpl::setHaveScrollEventHandlers(bool have_scroll_event_handlers) {
324 layer_->SetHaveScrollEventHandlers(have_scroll_event_handlers);
325 }
326
327 bool WebLayerImpl::haveScrollEventHandlers() const {
328 return layer_->have_scroll_event_handlers();
329 }
330
331 void WebLayerImpl::addMainThreadScrollingReasons( 323 void WebLayerImpl::addMainThreadScrollingReasons(
332 uint32_t main_thread_scrolling_reasons) { 324 uint32_t main_thread_scrolling_reasons) {
333 DCHECK(main_thread_scrolling_reasons); 325 DCHECK(main_thread_scrolling_reasons);
334 // WebLayerImpl should only know about non-transient scrolling 326 // WebLayerImpl should only know about non-transient scrolling
335 // reasons. Transient scrolling reasons are computed per hit test. 327 // reasons. Transient scrolling reasons are computed per hit test.
336 // TODO(tdresser): This is comparing less than a bit flag but that's not valid 328 // TODO(tdresser): This is comparing less than a bit flag but that's not valid
337 // if there is more than one reason given in |main_thread_scrolling_reasons|. 329 // if there is more than one reason given in |main_thread_scrolling_reasons|.
338 DCHECK_LE(main_thread_scrolling_reasons, 330 DCHECK_LE(main_thread_scrolling_reasons,
339 cc::MainThreadScrollingReason::kMaxNonTransientScrollingReasons); 331 cc::MainThreadScrollingReason::kMaxNonTransientScrollingReasons);
340 layer_->AddMainThreadScrollingReasons(main_thread_scrolling_reasons); 332 layer_->AddMainThreadScrollingReasons(main_thread_scrolling_reasons);
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 500
509 Layer* WebLayerImpl::layer() const { 501 Layer* WebLayerImpl::layer() const {
510 return layer_.get(); 502 return layer_.get();
511 } 503 }
512 504
513 void WebLayerImpl::SetContentsOpaqueIsFixed(bool fixed) { 505 void WebLayerImpl::SetContentsOpaqueIsFixed(bool fixed) {
514 contents_opaque_is_fixed_ = fixed; 506 contents_opaque_is_fixed_ = fixed;
515 } 507 }
516 508
517 } // namespace cc_blink 509 } // namespace cc_blink
OLDNEW
« no previous file with comments | « cc/blink/web_layer_impl.h ('k') | cc/debug/debug_rect_history.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698