| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_CONTROLLER_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_CONTROLLER_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_CONTROLLER_H_ | 6 #define IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 kIncognitoPanel, | 29 kIncognitoPanel, |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 // Converts from a NewTabPage::PanelIdentifier to a URL #fragment | 32 // Converts from a NewTabPage::PanelIdentifier to a URL #fragment |
| 33 // and vice versa. | 33 // and vice versa. |
| 34 PanelIdentifier IdentifierFromFragment(const std::string& fragment); | 34 PanelIdentifier IdentifierFromFragment(const std::string& fragment); |
| 35 std::string FragmentFromIdentifier(PanelIdentifier panel); | 35 std::string FragmentFromIdentifier(PanelIdentifier panel); |
| 36 | 36 |
| 37 } // namespace NewTabPage | 37 } // namespace NewTabPage |
| 38 | 38 |
| 39 @class BookmarkHomeTabletNTPController; |
| 39 @protocol CRWSwipeRecognizerProvider; | 40 @protocol CRWSwipeRecognizerProvider; |
| 40 @class GoogleLandingController; | 41 @class GoogleLandingController; |
| 41 @protocol NewTabPagePanelProtocol; | 42 @protocol NewTabPagePanelProtocol; |
| 42 @protocol OmniboxFocuser; | 43 @protocol OmniboxFocuser; |
| 43 @class TabModel; | 44 @class TabModel; |
| 44 @protocol WebToolbarDelegate; | 45 @protocol WebToolbarDelegate; |
| 45 @protocol UrlLoader; | 46 @protocol UrlLoader; |
| 46 | 47 |
| 47 // This protocol provides callbacks for when the NewTabPageController changes | 48 // This protocol provides callbacks for when the NewTabPageController changes |
| 48 // panels. | 49 // panels. |
| (...skipping 19 matching lines...) Expand all Loading... |
| 68 // |currentController_|. | 69 // |currentController_|. |
| 69 // | 70 // |
| 70 @interface NewTabPageController | 71 @interface NewTabPageController |
| 71 : NativeContentController<LogoAnimationControllerOwnerOwner, | 72 : NativeContentController<LogoAnimationControllerOwnerOwner, |
| 72 NewTabPageBarDelegate, | 73 NewTabPageBarDelegate, |
| 73 NewTabPagePanelControllerDelegate, | 74 NewTabPagePanelControllerDelegate, |
| 74 ToolbarOwner, | 75 ToolbarOwner, |
| 75 UIGestureRecognizerDelegate, | 76 UIGestureRecognizerDelegate, |
| 76 UIScrollViewDelegate> { | 77 UIScrollViewDelegate> { |
| 77 @private | 78 @private |
| 78 base::scoped_nsprotocol<id<NewTabPagePanelProtocol>> bookmarkController_; | 79 base::scoped_nsobject<BookmarkHomeTabletNTPController> bookmarkController_; |
| 79 base::scoped_nsobject<GoogleLandingController> googleLandingController_; | 80 base::scoped_nsobject<GoogleLandingController> googleLandingController_; |
| 80 base::scoped_nsprotocol<id<NewTabPagePanelProtocol>> incognitoController_; | 81 base::scoped_nsprotocol<id<NewTabPagePanelProtocol>> incognitoController_; |
| 81 // The currently visible controller, one of the above. | 82 // The currently visible controller, one of the above. |
| 82 id<NewTabPagePanelProtocol> currentController_; // weak | 83 id<NewTabPagePanelProtocol> currentController_; // weak |
| 83 } | 84 } |
| 84 | 85 |
| 85 @property(nonatomic, assign) id<CRWSwipeRecognizerProvider> | 86 @property(nonatomic, assign) id<CRWSwipeRecognizerProvider> |
| 86 swipeRecognizerProvider; | 87 swipeRecognizerProvider; |
| 87 | 88 |
| 88 // To ease modernizing the NTP only the internal panels are being converted | 89 // To ease modernizing the NTP only the internal panels are being converted |
| (...skipping 25 matching lines...) Expand all Loading... |
| 114 // shield. | 115 // shield. |
| 115 - (BOOL)wantsKeyboardShield; | 116 - (BOOL)wantsKeyboardShield; |
| 116 | 117 |
| 117 // Returns |YES| if the current visible controller allows showing the location | 118 // Returns |YES| if the current visible controller allows showing the location |
| 118 // bar hint text. | 119 // bar hint text. |
| 119 - (BOOL)wantsLocationBarHintText; | 120 - (BOOL)wantsLocationBarHintText; |
| 120 | 121 |
| 121 @end | 122 @end |
| 122 | 123 |
| 123 #endif // IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_CONTROLLER_H_ | 124 #endif // IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_CONTROLLER_H_ |
| OLD | NEW |