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

Side by Side Diff: ios/chrome/browser/ui/uikit_ui_util.h

Issue 1413903008: Add LargeIconCache and LargeIconServiceFactory for iOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Using wrong thread pool Created 5 years, 1 month 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
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 09:27:19 Why not #include "third_party/skia/include/core/Sk
justincohen 2015/10/30 11:59:21 Because it's not allowed during git cl upload.
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698