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

Unified Diff: ios/chrome/browser/ui/ntp/new_tab_page_panel_protocol.h

Issue 2589803002: Upstream Chrome on iOS source code [6/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
Index: ios/chrome/browser/ui/ntp/new_tab_page_panel_protocol.h
diff --git a/ios/chrome/browser/ui/ntp/new_tab_page_panel_protocol.h b/ios/chrome/browser/ui/ntp/new_tab_page_panel_protocol.h
new file mode 100644
index 0000000000000000000000000000000000000000..1ceb02dadaaa39b3778f7dabea96b7626d554457
--- /dev/null
+++ b/ios/chrome/browser/ui/ntp/new_tab_page_panel_protocol.h
@@ -0,0 +1,66 @@
+// 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_PANEL_PROTOCOL_H_
+#define IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_PANEL_PROTOCOL_H_
+
+#import <UIKit/UIKit.h>
+
+@protocol NewTabPagePanelProtocol;
+
+extern const int kNewTabPageShadowHeight;
+extern const int kNewTabPageDistanceToFadeShadow;
+
+@protocol NewTabPagePanelControllerDelegate<NSObject>
+
+// Updates the NTP bar shadow alpha for the given NewTabPagePanelProtocol.
+- (void)updateNtpBarShadowForPanelController:
+ (id<NewTabPagePanelProtocol>)ntpPanelController;
+
+@end
+
+// TODO(jbbegue): rename, extract and upstream so that CRWNativeContent can
+// implement it ( https://crbug.com/492156 ).
+@protocol NewTabPagePanelControllerSnapshotting<NSObject>
+
+@optional
+// Called when a snapshot of the content will be taken.
+- (void)willUpdateSnapshot;
+
+@end
+
+// Base class of a controller for the panels in the New Tab Page. This should
+// not be instantiated, but instead one of its sub-classes.
+@protocol NewTabPagePanelProtocol<NewTabPagePanelControllerSnapshotting>
+
+// NewTabPagePanelController delegate, may be nil.
+@property(nonatomic, assign) id<NewTabPagePanelControllerDelegate> delegate;
+
+// Alpha value to use for the NewTabPageBar shadow.
+@property(nonatomic, readonly) CGFloat alphaForBottomShadow;
+
+// Main view.
+@property(nonatomic, readonly) UIView* view;
+
+// Reload any displayed data to ensure the view is up to date.
+- (void)reload;
+
+// Notifies the NewTabPagePanelProtocol that it has been shown.
+- (void)wasShown;
+
+// Notifies the NewTabPagePanelProtocol that it has been hidden.
+- (void)wasHidden;
+
+// Dismisses any modal interaction elements.
+- (void)dismissModals;
+
+// Dismisses on-screen keyboard if necessary.
+- (void)dismissKeyboard;
+
+// Disable and enable scrollToTop
+- (void)setScrollsToTop:(BOOL)enable;
+
+@end
+
+#endif // IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_PANEL_PROTOCOL_H_
« no previous file with comments | « ios/chrome/browser/ui/ntp/new_tab_page_header_view.mm ('k') | ios/chrome/browser/ui/ntp/new_tab_page_panel_protocol.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698