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

Side by Side Diff: ios/chrome/browser/ui/toolbar/toolbar_button_tints.mm

Issue 2588733002: Upstream Chrome on iOS source code [9/11]. (Closed)
Patch Set: Created 4 years 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ios/chrome/browser/ui/toolbar/toolbar_button_tints.h"
6
7 #import "ios/chrome/browser/ui/uikit_ui_util.h"
8
9 namespace toolbar {
10
11 // The colors used to tint the buttons in the toolbar.
12 const int kLightModeNormalColor = 0x5A5A5A;
13 const int kIncognitoModeNormalColor = 0xFFFFFF;
14 const int kDarkModeNormalColor = 0xFFFFFF;
15 const int kPressedColor = 0x4285F4;
16
17 UIColor* NormalButtonTint(ToolbarControllerStyle style) {
18 switch (style) {
19 case ToolbarControllerStyleLightMode:
20 return UIColorFromRGB(kLightModeNormalColor);
21 case ToolbarControllerStyleIncognitoMode:
22 return UIColorFromRGB(kIncognitoModeNormalColor);
23 case ToolbarControllerStyleDarkMode:
24 return UIColorFromRGB(kDarkModeNormalColor);
25 case ToolbarControllerStyleMaxStyles:
26 NOTREACHED();
27 return nil;
28 }
29 }
30
31 UIColor* HighlighButtonTint(ToolbarControllerStyle style) {
32 return UIColorFromRGB(kPressedColor);
33 DCHECK_NE(ToolbarControllerStyleMaxStyles, style);
34 }
35
36 } // namespace toolbar
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/toolbar/toolbar_button_tints.h ('k') | ios/chrome/browser/ui/toolbar/toolbar_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698