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

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

Issue 983413004: Eliminate ui/ios (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « ios/chrome/browser/ui/ui_util.mm ('k') | ui/gfx/gfx.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #import "ios/chrome/browser/ui/uikit_ui_util.h" 5 #import "ios/chrome/browser/ui/uikit_ui_util.h"
6 6
7 #import <Accelerate/Accelerate.h> 7 #import <Accelerate/Accelerate.h>
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
9 #import <QuartzCore/QuartzCore.h> 9 #import <QuartzCore/QuartzCore.h>
10 #import <UIKit/UIKit.h> 10 #import <UIKit/UIKit.h>
11 #include <cmath> 11 #include <cmath>
12 12
13 #include "base/ios/ios_util.h" 13 #include "base/ios/ios_util.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/mac/foundation_util.h" 15 #include "base/mac/foundation_util.h"
16 #include "ios/chrome/browser/ui/ui_util.h" 16 #include "ios/chrome/browser/ui/ui_util.h"
17 #include "ios/chrome/browser/ui/ui_util.h" 17 #include "ios/chrome/browser/ui/ui_util.h"
18 #include "ui/base/l10n/l10n_util.h" 18 #include "ui/base/l10n/l10n_util.h"
19 #include "ui/base/l10n/l10n_util_mac.h" 19 #include "ui/base/l10n/l10n_util_mac.h"
20 #include "ui/gfx/ios/uikit_util.h"
20 #include "ui/gfx/scoped_cg_context_save_gstate_mac.h" 21 #include "ui/gfx/scoped_cg_context_save_gstate_mac.h"
21 #include "ui/ios/uikit_util.h"
22 22
23 namespace { 23 namespace {
24 24
25 // Linearly interpolate between |a| and |b| by fraction |f|. Satisfies 25 // Linearly interpolate between |a| and |b| by fraction |f|. Satisfies
26 // |Lerp(a,b,0) == a| and |Lerp(a,b,1) == b|. 26 // |Lerp(a,b,0) == a| and |Lerp(a,b,1) == b|.
27 CGFloat Lerp(CGFloat a, CGFloat b, CGFloat fraction) { 27 CGFloat Lerp(CGFloat a, CGFloat b, CGFloat fraction) {
28 return a * (1.0f - fraction) + b * fraction; 28 return a * (1.0f - fraction) + b * fraction;
29 } 29 }
30 30
31 // Gets the RGBA components from a UIColor in RBG or monochrome color space. 31 // Gets the RGBA components from a UIColor in RBG or monochrome color space.
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 DCHECK_NE(subview1, subview2); 450 DCHECK_NE(subview1, subview2);
451 [parentView addConstraint:[NSLayoutConstraint 451 [parentView addConstraint:[NSLayoutConstraint
452 constraintWithItem:subview1 452 constraintWithItem:subview1
453 attribute:NSLayoutAttributeCenterY 453 attribute:NSLayoutAttributeCenterY
454 relatedBy:NSLayoutRelationEqual 454 relatedBy:NSLayoutRelationEqual
455 toItem:subview2 455 toItem:subview2
456 attribute:NSLayoutAttributeCenterY 456 attribute:NSLayoutAttributeCenterY
457 multiplier:1 457 multiplier:1
458 constant:0]]; 458 constant:0]];
459 } 459 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/ui_util.mm ('k') | ui/gfx/gfx.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698