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

Unified Diff: ios/chrome/browser/ui/ntp/new_tab_page_bar.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/most_visited_layout.mm ('k') | ios/chrome/browser/ui/ntp/new_tab_page_bar.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.h
diff --git a/ios/chrome/browser/ui/ntp/new_tab_page_bar.h b/ios/chrome/browser/ui/ntp/new_tab_page_bar.h
new file mode 100644
index 0000000000000000000000000000000000000000..4258681a09561e09672091287432515cf2adf851
--- /dev/null
+++ b/ios/chrome/browser/ui/ntp/new_tab_page_bar.h
@@ -0,0 +1,42 @@
+// Copyright 2012 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_H_
+#define IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_BAR_H_
+
+#import <UIKit/UIKit.h>
+
+#import "ios/chrome/browser/ui/ntp/google_landing_controller.h"
+
+@class NewTabPageBarItem;
+
+@protocol NewTabPageBarDelegate
+// Called when new tab page bar item is selected and the selection is changed.
+// If |changePanel| is true, bring the panel into view in the scroll view.
+- (void)newTabBarItemDidChange:(NewTabPageBarItem*)selectedItem
+ changePanel:(BOOL)changePanel;
+@end
+
+// The bar in the new tab page that switches between the provided choices.
+// It also draws a notch pointing to the center of the selected choice to
+// create a "speech bubble" effect.
+@interface NewTabPageBar : UIView<UIGestureRecognizerDelegate>
+
+@property(nonatomic, retain) NSArray* items;
+@property(nonatomic, assign) NSUInteger selectedIndex;
+@property(nonatomic, assign) CGFloat overlayPercentage;
+@property(nonatomic, readonly, retain) NSArray* buttons;
+@property(nonatomic, assign) id<NewTabPageBarDelegate> delegate;
+
+// Changes the colors of the buttons and overlay depending on the content offset
+// of the scroll view. Tablet Incognito only.
+- (void)updateColorsForScrollView:(UIScrollView*)scrollView;
+
+// Updates the alpha of the shadow image. When the alpha changes from 0 to 1 or
+// 1 to 0, the alpha change is animated.
+- (void)setShadowAlpha:(CGFloat)alpha;
+
+@end
+
+#endif // IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_BAR_H_
« no previous file with comments | « ios/chrome/browser/ui/ntp/most_visited_layout.mm ('k') | ios/chrome/browser/ui/ntp/new_tab_page_bar.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698