Index: ios/chrome/browser/ui/tab_switcher/tab_switcher_view.h |
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_switcher_view.h b/ios/chrome/browser/ui/tab_switcher/tab_switcher_view.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..950266cb0574aaa94949a25a1668c4ed7fe9f0a5 |
--- /dev/null |
+++ b/ios/chrome/browser/ui/tab_switcher/tab_switcher_view.h |
@@ -0,0 +1,54 @@ |
+// 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_TAB_SWITCHER_TAB_SWITCHER_VIEW_H_ |
+#define IOS_CHROME_BROWSER_UI_TAB_SWITCHER_TAB_SWITCHER_VIEW_H_ |
+ |
+#import <UIKit/UIKit.h> |
+ |
+#import "ios/chrome/browser/ui/tab_switcher/tab_switcher_model.h" |
+ |
+@class TabSwitcherHeaderView; |
+@class TabSwitcherView; |
+ |
+namespace ios_internal { |
+enum NewTabButtonStyle { UNINITIALIZED, BLUE, GRAY, HIDDEN }; |
+} // namespace ios_internal |
+ |
+@protocol TabSwitcherViewDelegate<NSObject> |
+ |
+- (void)openNewTabInPanelAtIndex:(NSInteger)panelIndex; |
+- (ios_internal::NewTabButtonStyle)buttonStyleForPanelAtIndex: |
+ (NSInteger)panelIndex; |
+- (BOOL)shouldShowDismissButtonForPanelAtIndex:(NSInteger)panelIndex; |
+- (void)tabSwitcherViewDelegateDismissTabSwitcher:(TabSwitcherView*)delegate; |
+ |
+@end |
+ |
+@interface TabSwitcherView : UIView<UIScrollViewDelegate> |
+ |
+@property(nonatomic, readonly) TabSwitcherHeaderView* headerView; |
+@property(nonatomic, readonly) UIScrollView* scrollView; |
+ |
+@property(nonatomic, assign) id<TabSwitcherViewDelegate> delegate; |
+ |
+// Select the panel at the given index, updating both the header and content. |
+// The panel selection will be animated if VoiceOver is disabled. |
+- (void)selectPanelAtIndex:(NSInteger)index; |
+// Adds the view |view| at index |index|. |
+- (void)addPanelView:(UIView*)view atIndex:(NSUInteger)index; |
+// Removes the view at index |index| and update scrollview. |
+- (void)removePanelViewAtIndex:(NSUInteger)index; |
+// Removes the view at index |index| and update scrollview if |update| is true. |
+- (void)removePanelViewAtIndex:(NSUInteger)index updateScrollView:(BOOL)update; |
+// Returns the index of the currently selected panel. |
+- (NSInteger)currentPanelIndex; |
+// Updates the state of the tab switcher overlay buttons. |
+// Overlay buttons are the top right dismiss button and the bottom right new tab |
+// button. |
+- (void)updateOverlayButtonState; |
+ |
+@end |
+ |
+#endif // IOS_CHROME_BROWSER_UI_TAB_SWITCHER_TAB_SWITCHER_VIEW_H_ |