| 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 20 matching lines...) Expand all Loading... |
| 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 @class BookmarkHomeTabletNTPController; |
| 40 @protocol CRWSwipeRecognizerProvider; | 40 @protocol CRWSwipeRecognizerProvider; |
| 41 @class GoogleLandingController; | 41 @class GoogleLandingViewController; |
| 42 @protocol NewTabPagePanelProtocol; | 42 @protocol NewTabPagePanelProtocol; |
| 43 @protocol OmniboxFocuser; | 43 @protocol OmniboxFocuser; |
| 44 @class TabModel; | 44 @class TabModel; |
| 45 @protocol WebToolbarDelegate; | 45 @protocol WebToolbarDelegate; |
| 46 @protocol UrlLoader; | 46 @protocol UrlLoader; |
| 47 | 47 |
| 48 // This protocol provides callbacks for when the NewTabPageController changes | 48 // This protocol provides callbacks for when the NewTabPageController changes |
| 49 // panels. | 49 // panels. |
| 50 @protocol NewTabPageControllerObserver | 50 @protocol NewTabPageControllerObserver |
| 51 // The current visible panel has changed. | 51 // The current visible panel has changed. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 70 // | 70 // |
| 71 @interface NewTabPageController | 71 @interface NewTabPageController |
| 72 : NativeContentController<LogoAnimationControllerOwnerOwner, | 72 : NativeContentController<LogoAnimationControllerOwnerOwner, |
| 73 NewTabPageBarDelegate, | 73 NewTabPageBarDelegate, |
| 74 NewTabPagePanelControllerDelegate, | 74 NewTabPagePanelControllerDelegate, |
| 75 ToolbarOwner, | 75 ToolbarOwner, |
| 76 UIGestureRecognizerDelegate, | 76 UIGestureRecognizerDelegate, |
| 77 UIScrollViewDelegate> { | 77 UIScrollViewDelegate> { |
| 78 @private | 78 @private |
| 79 base::scoped_nsobject<BookmarkHomeTabletNTPController> bookmarkController_; | 79 base::scoped_nsobject<BookmarkHomeTabletNTPController> bookmarkController_; |
| 80 base::scoped_nsobject<GoogleLandingController> googleLandingController_; | 80 base::scoped_nsobject<GoogleLandingViewController> googleLandingController_; |
| 81 base::scoped_nsprotocol<id<NewTabPagePanelProtocol>> incognitoController_; | 81 base::scoped_nsprotocol<id<NewTabPagePanelProtocol>> incognitoController_; |
| 82 // The currently visible controller, one of the above. | 82 // The currently visible controller, one of the above. |
| 83 id<NewTabPagePanelProtocol> currentController_; // weak | 83 id<NewTabPagePanelProtocol> currentController_; // weak |
| 84 } | 84 } |
| 85 | 85 |
| 86 @property(nonatomic, assign) id<CRWSwipeRecognizerProvider> | 86 @property(nonatomic, assign) id<CRWSwipeRecognizerProvider> |
| 87 swipeRecognizerProvider; | 87 swipeRecognizerProvider; |
| 88 | 88 |
| 89 // Init with the given url (presumably "chrome://newtab") and loader object. | 89 // Init with the given url (presumably "chrome://newtab") and loader object. |
| 90 // |loader| may be nil, but isn't retained so it must outlive this controller. | 90 // |loader| may be nil, but isn't retained so it must outlive this controller. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 108 // shield. | 108 // shield. |
| 109 - (BOOL)wantsKeyboardShield; | 109 - (BOOL)wantsKeyboardShield; |
| 110 | 110 |
| 111 // Returns |YES| if the current visible controller allows showing the location | 111 // Returns |YES| if the current visible controller allows showing the location |
| 112 // bar hint text. | 112 // bar hint text. |
| 113 - (BOOL)wantsLocationBarHintText; | 113 - (BOOL)wantsLocationBarHintText; |
| 114 | 114 |
| 115 @end | 115 @end |
| 116 | 116 |
| 117 #endif // IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_CONTROLLER_H_ | 117 #endif // IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_CONTROLLER_H_ |
| OLD | NEW |