| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef IOS_CHROME_SHARE_EXTENSION_UI_UTIL_H_ | 5 #ifndef IOS_CHROME_SHARE_EXTENSION_UI_UTIL_H_ |
| 6 #define IOS_CHROME_SHARE_EXTENSION_UI_UTIL_H_ | 6 #define IOS_CHROME_SHARE_EXTENSION_UI_UTIL_H_ |
| 7 | 7 |
| 8 namespace ui_util { | 8 namespace ui_util { |
| 9 | 9 |
| 10 // Standard animation timing for the extension. |
| 11 extern const CGFloat kAnimationDuration; |
| 12 |
| 10 // Returns the closest pixel-aligned value less than |value|, taking the scale | 13 // Returns the closest pixel-aligned value less than |value|, taking the scale |
| 11 // factor into account. At a scale of 1, equivalent to floor(). | 14 // factor into account. At a scale of 1, equivalent to floor(). |
| 12 CGFloat AlignValueToPixel(CGFloat value); | 15 CGFloat AlignValueToPixel(CGFloat value); |
| 13 | 16 |
| 14 // Creates constraints so that |filler| fills entirely |container| and make them | 17 // Creates constraints so that |filler| fills entirely |container| and make them |
| 15 // active. | 18 // active. |
| 16 void ConstrainAllSidesOfViewToView(UIView* container, UIView* filler); | 19 void ConstrainAllSidesOfViewToView(UIView* container, UIView* filler); |
| 17 | 20 |
| 18 } // namespace ui_util | 21 } // namespace ui_util |
| 19 | 22 |
| 20 #endif // IOS_CHROME_SHARE_EXTENSION_UI_UTIL_H_ | 23 #endif // IOS_CHROME_SHARE_EXTENSION_UI_UTIL_H_ |
| OLD | NEW |