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

Side by Side Diff: cc/input/scroll_boundary_behavior.h

Issue 2884423003: Use scroll-boundary-behavior to control overscroll-refresh/glow on android. (Closed)
Patch Set: Update the test Created 3 years, 6 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
(Empty)
1 // Copyright (c) 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_INPUT_SCROLL_BOUNDARY_BEHAVIOR_H_
6 #define CC_INPUT_SCROLL_BOUNDARY_BEHAVIOR_H_
7
8 #include "cc/cc_export.h"
9
10 namespace cc {
11
12 struct CC_EXPORT ScrollBoundaryBehavior {
13 enum ScrollBoundaryBehaviorType {
14 kScrollBoundaryBehaviorTypeAuto = 0x0,
15 kScrollBoundaryBehaviorTypeContain = 0x1,
16 kScrollBoundaryBehaviorTypeNone = 0x2
17 };
18
19 ScrollBoundaryBehavior()
20 : x(kScrollBoundaryBehaviorTypeAuto),
21 y(kScrollBoundaryBehaviorTypeAuto) {}
22 explicit ScrollBoundaryBehavior(ScrollBoundaryBehaviorType type)
23 : x(type), y(type) {}
24 ScrollBoundaryBehavior(ScrollBoundaryBehaviorType x_type,
25 ScrollBoundaryBehaviorType y_type)
26 : x(x_type), y(y_type) {}
27
28 ScrollBoundaryBehaviorType x;
29 ScrollBoundaryBehaviorType y;
30
31 bool operator==(const ScrollBoundaryBehavior& a) const {
32 return (a.x == x) && (a.y == y);
33 }
34 bool operator!=(const ScrollBoundaryBehavior& a) const {
35 return (a.x != x) || (a.y != y);
36 }
37 };
38
39 } // namespace cc
40
41 #endif // CC_INPUT_SCROLL_BOUNDARY_BEHAVIOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698