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

Side by Side Diff: ios/chrome/browser/ui/ntp/new_tab_page_bar_button.h

Issue 2590473002: Upstream Chrome on iOS source code [5/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 2015 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 #ifndef IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_BAR_BUTTON_H_
6 #define IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_BAR_BUTTON_H_
7
8 #import <Foundation/Foundation.h>
9 #import <UIKit/UIKit.h>
10
11 @class NewTabPageBarItem;
12
13 namespace new_tab_page_bar_button {
14
15 enum class ContentType {
16 IMAGE,
17 TEXT,
18 };
19
20 } // namespace new_tab_page_bar_button
21
22 // Represents a button in the new tab page bar.
23 @interface NewTabPageBarButton : UIButton
24
25 // Returns an autoreleased button based on |item|'s |title| and |image|. By
26 // defaults, the button shows the title instead of the image, and with a non
27 // incognito color scheme.
28 + (instancetype)buttonWithItem:(NewTabPageBarItem*)item;
29
30 // Selects which color scheme to use for the buttons. If |percentage| is 1.0,
31 // the color scheme is for incognito. If |percentage| is 0.0, the color scheme
32 // is for non incognito. If |percentage| is in-between, the color scheme is an
33 // interpolation between the two.
34 // Percentage must be in the interval [0, 1].
35 - (void)useIncognitoColorScheme:(CGFloat)percentage;
36
37 // Selects which kind of content the button should display.
38 - (void)setContentToDisplay:(new_tab_page_bar_button::ContentType)contentType;
39
40 @end
41
42 #endif // IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_BAR_BUTTON_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/ntp/new_tab_page_bar.mm ('k') | ios/chrome/browser/ui/ntp/new_tab_page_bar_button.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698