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

Side by Side Diff: ios/chrome/browser/ui/ntp/new_tab_page_controller.h

Issue 2820063003: Fix NTP parentViewController. (Closed)
Patch Set: Fix tests Created 3 years, 8 months 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 unified diff | Download patch
OLDNEW
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 base::scoped_nsprotocol<id<NewTabPagePanelProtocol>> bookmarkController_; 78 base::scoped_nsprotocol<id<NewTabPagePanelProtocol>> bookmarkController_;
79 base::scoped_nsobject<GoogleLandingController> googleLandingController_; 79 base::scoped_nsobject<GoogleLandingController> googleLandingController_;
80 base::scoped_nsprotocol<id<NewTabPagePanelProtocol>> incognitoController_; 80 base::scoped_nsprotocol<id<NewTabPagePanelProtocol>> incognitoController_;
81 // The currently visible controller, one of the above. 81 // The currently visible controller, one of the above.
82 id<NewTabPagePanelProtocol> currentController_; // weak 82 id<NewTabPagePanelProtocol> currentController_; // weak
83 } 83 }
84 84
85 @property(nonatomic, assign) id<CRWSwipeRecognizerProvider> 85 @property(nonatomic, assign) id<CRWSwipeRecognizerProvider>
86 swipeRecognizerProvider; 86 swipeRecognizerProvider;
87 87
88 // To ease modernizing the NTP only the internal panels are being converted
89 // to UIViewControllers. This means all the plumbing between the
90 // BrowserViewController and the internal NTP panels (WebController, NTP)
91 // hierarchy is skipped. While normally the logic to push and pop a view
92 // controller would be owned by a coordinator, in this case the old NTP
93 // controller adds and removes child view controllers itself when a load
94 // is initiated, and when WebController calls -willBeDismissed.
95 @property(nonatomic, assign) UIViewController* parentViewController;
96
97 // Init with the given url (presumably "chrome://newtab") and loader object. 88 // Init with the given url (presumably "chrome://newtab") and loader object.
98 // |loader| may be nil, but isn't retained so it must outlive this controller. 89 // |loader| may be nil, but isn't retained so it must outlive this controller.
99 // Dominant color cache is passed to bookmark controller only, to optimize 90 // Dominant color cache is passed to bookmark controller only, to optimize
100 // favicon processing. 91 // favicon processing.
101 - (id)initWithUrl:(const GURL&)url 92 - (id)initWithUrl:(const GURL&)url
102 loader:(id<UrlLoader>)loader 93 loader:(id<UrlLoader>)loader
103 focuser:(id<OmniboxFocuser>)focuser 94 focuser:(id<OmniboxFocuser>)focuser
104 ntpObserver:(id<NewTabPageControllerObserver>)ntpObserver 95 ntpObserver:(id<NewTabPageControllerObserver>)ntpObserver
105 browserState:(ios::ChromeBrowserState*)browserState 96 browserState:(ios::ChromeBrowserState*)browserState
106 colorCache:(NSMutableDictionary*)colorCache 97 colorCache:(NSMutableDictionary*)colorCache
107 webToolbarDelegate:(id<WebToolbarDelegate>)webToolbarDelegate 98 webToolbarDelegate:(id<WebToolbarDelegate>)webToolbarDelegate
108 tabModel:(TabModel*)tabModel; 99 tabModel:(TabModel*)tabModel
100 parentViewController:(UIViewController*)parentViewController;
109 101
110 // Select a panel based on the given |panelType|. 102 // Select a panel based on the given |panelType|.
111 - (void)selectPanel:(NewTabPage::PanelIdentifier)panelType; 103 - (void)selectPanel:(NewTabPage::PanelIdentifier)panelType;
112 104
113 // Returns |YES| if the current visible controller should show the keyboard 105 // Returns |YES| if the current visible controller should show the keyboard
114 // shield. 106 // shield.
115 - (BOOL)wantsKeyboardShield; 107 - (BOOL)wantsKeyboardShield;
116 108
117 // Returns |YES| if the current visible controller allows showing the location 109 // Returns |YES| if the current visible controller allows showing the location
118 // bar hint text. 110 // bar hint text.
119 - (BOOL)wantsLocationBarHintText; 111 - (BOOL)wantsLocationBarHintText;
120 112
121 @end 113 @end
122 114
123 #endif // IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_CONTROLLER_H_ 115 #endif // IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/browser_view_controller.mm ('k') | ios/chrome/browser/ui/ntp/new_tab_page_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698