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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/ntp/new_tab_page_bar_button.h
diff --git a/ios/chrome/browser/ui/ntp/new_tab_page_bar_button.h b/ios/chrome/browser/ui/ntp/new_tab_page_bar_button.h
new file mode 100644
index 0000000000000000000000000000000000000000..8313c02103875dd689df0d650b279f59e7ee55a0
--- /dev/null
+++ b/ios/chrome/browser/ui/ntp/new_tab_page_bar_button.h
@@ -0,0 +1,42 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_BAR_BUTTON_H_
+#define IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_BAR_BUTTON_H_
+
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
+
+@class NewTabPageBarItem;
+
+namespace new_tab_page_bar_button {
+
+enum class ContentType {
+ IMAGE,
+ TEXT,
+};
+
+} // namespace new_tab_page_bar_button
+
+// Represents a button in the new tab page bar.
+@interface NewTabPageBarButton : UIButton
+
+// Returns an autoreleased button based on |item|'s |title| and |image|. By
+// defaults, the button shows the title instead of the image, and with a non
+// incognito color scheme.
++ (instancetype)buttonWithItem:(NewTabPageBarItem*)item;
+
+// Selects which color scheme to use for the buttons. If |percentage| is 1.0,
+// the color scheme is for incognito. If |percentage| is 0.0, the color scheme
+// is for non incognito. If |percentage| is in-between, the color scheme is an
+// interpolation between the two.
+// Percentage must be in the interval [0, 1].
+- (void)useIncognitoColorScheme:(CGFloat)percentage;
+
+// Selects which kind of content the button should display.
+- (void)setContentToDisplay:(new_tab_page_bar_button::ContentType)contentType;
+
+@end
+
+#endif // IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_BAR_BUTTON_H_
« 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