Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_BROWSER_UI_UIKIT_UI_UTIL_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_UIKIT_UI_UTIL_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_UIKIT_UI_UTIL_H_ | 6 #define IOS_CHROME_BROWSER_UI_UIKIT_UI_UTIL_H_ |
| 7 | 7 |
| 8 #include <CoreGraphics/CoreGraphics.h> | 8 #include <CoreGraphics/CoreGraphics.h> |
| 9 #import <Foundation/Foundation.h> | 9 #import <Foundation/Foundation.h> |
| 10 #import <UIKit/UIKit.h> | 10 #import <UIKit/UIKit.h> |
| 11 | 11 |
| 12 #import "ios/chrome/browser/ui/ui_util.h" | 12 #import "ios/chrome/browser/ui/ui_util.h" |
| 13 #include "ui/gfx/color_analysis.h" | |
|
sdefresne
2015/10/30 14:19:37
I still think we should include #include "third_pa
justincohen
2015/10/30 15:25:16
mioved to skia-utils-ios
| |
| 13 | 14 |
| 14 // UI Util containing functions that require UIKit. | 15 // UI Util containing functions that require UIKit. |
| 15 | 16 |
| 16 enum { FONT_HELVETICA, FONT_HELVETICA_NEUE, FONT_HELVETICA_NEUE_LIGHT }; | 17 enum { FONT_HELVETICA, FONT_HELVETICA_NEUE, FONT_HELVETICA_NEUE_LIGHT }; |
| 17 | 18 |
| 18 // Utility function to set the |element|'s accessibility label to the localized | 19 // Utility function to set the |element|'s accessibility label to the localized |
| 19 // message corresponding to |idsAccessibilityLabel| and its accessibility | 20 // message corresponding to |idsAccessibilityLabel| and its accessibility |
| 20 // identifier to |englishUiAutomationName|. | 21 // identifier to |englishUiAutomationName|. |
| 21 // Call SetA11yLabelAndUiAutomationName() if |element| is accessible and its | 22 // Call SetA11yLabelAndUiAutomationName() if |element| is accessible and its |
| 22 // a11y label should be localized. | 23 // a11y label should be localized. |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 183 // horizontal size class. | 184 // horizontal size class. |
| 184 bool IsCompact(); | 185 bool IsCompact(); |
| 185 | 186 |
| 186 // Whether the |environment| has a compact iPad horizontal size class. | 187 // Whether the |environment| has a compact iPad horizontal size class. |
| 187 bool IsCompactTablet(id<UITraitEnvironment> environment); | 188 bool IsCompactTablet(id<UITraitEnvironment> environment); |
| 188 | 189 |
| 189 // Whether the main application window's rootViewController has a compact | 190 // Whether the main application window's rootViewController has a compact |
| 190 // iPad horizontal size class. | 191 // iPad horizontal size class. |
| 191 bool IsCompactTablet(); | 192 bool IsCompactTablet(); |
| 192 | 193 |
| 194 // Returns a UIColor for an SKColor and alpha. | |
| 195 UIColor* ColorFromSkColor(SkColor color, CGFloat alpha); | |
| 196 | |
| 193 #endif // IOS_CHROME_BROWSER_UI_UIKIT_UI_UTIL_H_ | 197 #endif // IOS_CHROME_BROWSER_UI_UIKIT_UI_UTIL_H_ |
| OLD | NEW |