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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 // | 67 // |
68 // The currently visible *PanelController is accessible through | 68 // The currently visible *PanelController is accessible through |
69 // |currentController_|. | 69 // |currentController_|. |
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 | |
79 base::scoped_nsobject<BookmarkHomeTabletNTPController> bookmarkController_; | |
80 base::scoped_nsobject<GoogleLandingViewController> googleLandingController_; | |
81 base::scoped_nsprotocol<id<NewTabPagePanelProtocol>> incognitoController_; | |
82 // The currently visible controller, one of the above. | |
83 id<NewTabPagePanelProtocol> currentController_; // weak | |
84 } | |
85 | 78 |
86 @property(nonatomic, assign) id<CRWSwipeRecognizerProvider> | 79 @property(nonatomic, weak) id<CRWSwipeRecognizerProvider> |
87 swipeRecognizerProvider; | 80 swipeRecognizerProvider; |
88 | 81 |
89 // Init with the given url (presumably "chrome://newtab") and loader object. | 82 // 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. | 83 // |loader| may be nil, but isn't retained so it must outlive this controller. |
91 // Dominant color cache is passed to bookmark controller only, to optimize | 84 // Dominant color cache is passed to bookmark controller only, to optimize |
92 // favicon processing. | 85 // favicon processing. |
93 - (id)initWithUrl:(const GURL&)url | 86 - (id)initWithUrl:(const GURL&)url |
94 loader:(id<UrlLoader>)loader | 87 loader:(id<UrlLoader>)loader |
95 focuser:(id<OmniboxFocuser>)focuser | 88 focuser:(id<OmniboxFocuser>)focuser |
96 ntpObserver:(id<NewTabPageControllerObserver>)ntpObserver | 89 ntpObserver:(id<NewTabPageControllerObserver>)ntpObserver |
(...skipping 11 matching lines...) Expand all Loading... |
108 // shield. | 101 // shield. |
109 - (BOOL)wantsKeyboardShield; | 102 - (BOOL)wantsKeyboardShield; |
110 | 103 |
111 // Returns |YES| if the current visible controller allows showing the location | 104 // Returns |YES| if the current visible controller allows showing the location |
112 // bar hint text. | 105 // bar hint text. |
113 - (BOOL)wantsLocationBarHintText; | 106 - (BOOL)wantsLocationBarHintText; |
114 | 107 |
115 @end | 108 @end |
116 | 109 |
117 #endif // IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_CONTROLLER_H_ | 110 #endif // IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_CONTROLLER_H_ |
OLD | NEW |