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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.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 against scroll blocks on 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/renderer/gpu/render_widget_compositor.h" 5 #include "content/renderer/gpu/render_widget_compositor.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 } 746 }
747 747
748 void RenderWidgetCompositor::setHaveWheelEventHandlers(bool value) { 748 void RenderWidgetCompositor::setHaveWheelEventHandlers(bool value) {
749 layer_tree_host_->SetHaveWheelEventHandlers(value); 749 layer_tree_host_->SetHaveWheelEventHandlers(value);
750 } 750 }
751 751
752 bool RenderWidgetCompositor::haveWheelEventHandlers() const { 752 bool RenderWidgetCompositor::haveWheelEventHandlers() const {
753 return layer_tree_host_->have_wheel_event_handlers(); 753 return layer_tree_host_->have_wheel_event_handlers();
754 } 754 }
755 755
756 void RenderWidgetCompositor::setHaveScrollEventHandlers(bool has_handlers) {
757 layer_tree_host_->SetHaveScrollEventHandlers(has_handlers);
758 }
759
760 bool RenderWidgetCompositor::haveScrollEventHandlers() const {
761 return layer_tree_host_->have_scroll_event_handlers();
762 }
763
756 void CompositeAndReadbackAsyncCallback( 764 void CompositeAndReadbackAsyncCallback(
757 blink::WebCompositeAndReadbackAsyncCallback* callback, 765 blink::WebCompositeAndReadbackAsyncCallback* callback,
758 scoped_ptr<cc::CopyOutputResult> result) { 766 scoped_ptr<cc::CopyOutputResult> result) {
759 if (result->HasBitmap()) { 767 if (result->HasBitmap()) {
760 scoped_ptr<SkBitmap> result_bitmap = result->TakeBitmap(); 768 scoped_ptr<SkBitmap> result_bitmap = result->TakeBitmap();
761 callback->didCompositeAndReadback(*result_bitmap); 769 callback->didCompositeAndReadback(*result_bitmap);
762 } else { 770 } else {
763 callback->didCompositeAndReadback(SkBitmap()); 771 callback->didCompositeAndReadback(SkBitmap());
764 } 772 }
765 } 773 }
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 #endif 1116 #endif
1109 return actual; 1117 return actual;
1110 } 1118 }
1111 1119
1112 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( 1120 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor(
1113 float device_scale) { 1121 float device_scale) {
1114 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); 1122 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale);
1115 } 1123 }
1116 1124
1117 } // namespace content 1125 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698