// Copyright 2015 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CC_LAYERS_VIEWPORT_H_ #define CC_LAYERS_VIEWPORT_H_ #include <memory> #include "base/gtest_prod_util.h" #include "base/memory/raw_ptr.h" #include "cc/layers/layer_impl.h" #include "ui/gfx/geometry/vector2d_f.h" namespace cc { class LayerTreeHostImpl; struct ScrollNode; // Encapsulates gesture handling logic on the viewport layers. The "viewport" // is made up of two scrolling layers, the inner viewport (visual) and the // outer viewport (layout) scroll layers. These layers have different scroll // bubbling behavior from the rest of the layer tree which is encoded in this // class. // // When performing any kind of scroll operations on either the inner or outer // scroll node, they must be done using this class. Typically, the outer // viewport's scroll node will be used in the scroll chain to represent a full // viewport scroll (i.e. one that will use this class to scroll both inner and // outer viewports, as appropriate). However, in some situations (see comments // in LayerTreeHostImpl::GetNodeToScroll) we may wish to scroll only the inner // viewport. In that case, the inner viewport is used in the scroll chain, but // we should still scroll using this class. class CC_EXPORT Viewport { … }; } // namespace cc #endif // CC_LAYERS_VIEWPORT_H_