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

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

Issue 2806153004: Convert main NTP panel to UIViewController. (Closed)
Patch Set: Comment typo 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;
rohitrao (ping after 24h) 2017/04/12 12:45:09 Blank line after.
justincohen 2017/04/12 14:23:12 Done.
88 // Init with the given url (presumably "chrome://newtab") and loader object. 96 // Init with the given url (presumably "chrome://newtab") and loader object.
89 // |loader| may be nil, but isn't retained so it must outlive this controller. 97 // |loader| may be nil, but isn't retained so it must outlive this controller.
90 // Dominant color cache is passed to bookmark controller only, to optimize 98 // Dominant color cache is passed to bookmark controller only, to optimize
91 // favicon processing. 99 // favicon processing.
92 - (id)initWithUrl:(const GURL&)url 100 - (id)initWithUrl:(const GURL&)url
93 loader:(id<UrlLoader>)loader 101 loader:(id<UrlLoader>)loader
94 focuser:(id<OmniboxFocuser>)focuser 102 focuser:(id<OmniboxFocuser>)focuser
95 ntpObserver:(id<NewTabPageControllerObserver>)ntpObserver 103 ntpObserver:(id<NewTabPageControllerObserver>)ntpObserver
96 browserState:(ios::ChromeBrowserState*)browserState 104 browserState:(ios::ChromeBrowserState*)browserState
97 colorCache:(NSMutableDictionary*)colorCache 105 colorCache:(NSMutableDictionary*)colorCache
98 webToolbarDelegate:(id<WebToolbarDelegate>)webToolbarDelegate 106 webToolbarDelegate:(id<WebToolbarDelegate>)webToolbarDelegate
99 tabModel:(TabModel*)tabModel; 107 tabModel:(TabModel*)tabModel;
100 108
101 // Select a panel based on the given |panelType|. 109 // Select a panel based on the given |panelType|.
102 - (void)selectPanel:(NewTabPage::PanelIdentifier)panelType; 110 - (void)selectPanel:(NewTabPage::PanelIdentifier)panelType;
103 111
104 // Returns |YES| if the current visible controller should show the keyboard 112 // Returns |YES| if the current visible controller should show the keyboard
105 // shield. 113 // shield.
106 - (BOOL)wantsKeyboardShield; 114 - (BOOL)wantsKeyboardShield;
107 115
108 // Returns |YES| if the current visible controller allows showing the location 116 // Returns |YES| if the current visible controller allows showing the location
109 // bar hint text. 117 // bar hint text.
110 - (BOOL)wantsLocationBarHintText; 118 - (BOOL)wantsLocationBarHintText;
111 119
112 @end 120 @end
113 121
114 #endif // IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_CONTROLLER_H_ 122 #endif // IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698