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

Unified Diff: cc/layers/layer_position_constraint.h

Issue 12552004: Support bottom-right anchored fixed-position elements during a pinch gesture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: correct translate order. move math to a separate function. Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: cc/layers/layer_position_constraint.h
diff --git a/cc/layers/layer_position_constraint.h b/cc/layers/layer_position_constraint.h
new file mode 100644
index 0000000000000000000000000000000000000000..9675053f5ce5e4a21403a18f447a060a13e23b99
--- /dev/null
+++ b/cc/layers/layer_position_constraint.h
@@ -0,0 +1,32 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_LAYER_POSITION_CONSTRAINT_H_
+#define CC_LAYER_POSITION_CONSTRAINT_H_
+
+namespace cc {
+
+class LayerPositionConstraint {
+public:
Sami 2013/03/25 11:41:37 Indent labels by 1.
trchen 2013/03/26 01:45:28 Done.
+ LayerPositionConstraint();
+
+ void SetIsFixedPosition(bool fixed) { is_fixed_position_ = fixed; }
Sami 2013/03/25 11:41:37 These setters should be set_foo() style.
trchen 2013/03/26 01:45:28 Done.
+ bool is_fixed_position() const { return is_fixed_position_; }
+ void SetIsFixedToRightEdge(bool fixed) { is_fixed_to_right_edge_ = fixed; }
+ bool is_fixed_to_right_edge() const { return is_fixed_to_right_edge_; }
+ void SetIsFixedToBottomEdge(bool fixed) { is_fixed_to_bottom_edge_ = fixed; }
+ bool is_fixed_to_bottom_edge() const { return is_fixed_to_bottom_edge_; }
+
+ bool operator==(const LayerPositionConstraint&) const;
+ bool operator!=(const LayerPositionConstraint&) const;
+
+private:
+ bool is_fixed_position_ : 1;
+ bool is_fixed_to_right_edge_ : 1;
+ bool is_fixed_to_bottom_edge_ : 1;
+};
+
+} // namespace cc
+
+#endif // CC_LAYER_POSITION_CONSTRAINT_H_

Powered by Google App Engine
This is Rietveld 408576698