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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 2479663002: Move compositor InputHandler from RenderViewImpl to RenderWidget. (Closed)
Patch Set: Rebase to master@{#445291}. Created 3 years, 11 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 | « no previous file | chrome/browser/site_per_process_interactive_browsertest.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 2984 matching lines...) Expand 10 before | Expand all | Expand 10 after
2995 bool is_viewport_scroll_layer = 2995 bool is_viewport_scroll_layer =
2996 viewport()->MainScrollLayer() && 2996 viewport()->MainScrollLayer() &&
2997 scroll_node->owning_layer_id == viewport()->MainScrollLayer()->id(); 2997 scroll_node->owning_layer_id == viewport()->MainScrollLayer()->id();
2998 2998
2999 // This is needed if the scroll chains up to the viewport without going 2999 // This is needed if the scroll chains up to the viewport without going
3000 // through the outer viewport scroll layer. This can happen if we scroll an 3000 // through the outer viewport scroll layer. This can happen if we scroll an
3001 // element that's not a descendant of the document.rootScroller. In that case 3001 // element that's not a descendant of the document.rootScroller. In that case
3002 // we want to scroll the inner viewport -- to allow panning while zoomed -- 3002 // we want to scroll the inner viewport -- to allow panning while zoomed --
3003 // but also move browser controls if needed. 3003 // but also move browser controls if needed.
3004 bool is_inner_viewport_scroll_layer = 3004 bool is_inner_viewport_scroll_layer =
3005 InnerViewportScrollLayer() &&
3005 scroll_node->owning_layer_id == InnerViewportScrollLayer()->id(); 3006 scroll_node->owning_layer_id == InnerViewportScrollLayer()->id();
3006 3007
3007 if (is_viewport_scroll_layer || is_inner_viewport_scroll_layer) { 3008 if (is_viewport_scroll_layer || is_inner_viewport_scroll_layer) {
3008 Viewport::ScrollResult result = viewport()->ScrollBy( 3009 Viewport::ScrollResult result = viewport()->ScrollBy(
3009 delta, viewport_point, scroll_state->is_direct_manipulation(), 3010 delta, viewport_point, scroll_state->is_direct_manipulation(),
3010 !wheel_scrolling_, is_viewport_scroll_layer); 3011 !wheel_scrolling_, is_viewport_scroll_layer);
3011 3012
3012 applied_delta = result.consumed_delta; 3013 applied_delta = result.consumed_delta;
3013 delta_applied_to_content = result.content_scrolled_delta; 3014 delta_applied_to_content = result.content_scrolled_delta;
3014 } else { 3015 } else {
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
4093 worker_context_visibility_ = 4094 worker_context_visibility_ =
4094 worker_context->CacheController()->ClientBecameVisible(); 4095 worker_context->CacheController()->ClientBecameVisible();
4095 } else { 4096 } else {
4096 worker_context->CacheController()->ClientBecameNotVisible( 4097 worker_context->CacheController()->ClientBecameNotVisible(
4097 std::move(worker_context_visibility_)); 4098 std::move(worker_context_visibility_));
4098 } 4099 }
4099 } 4100 }
4100 } 4101 }
4101 4102
4102 } // namespace cc 4103 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/site_per_process_interactive_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698