-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[iOS] [WebChannels] Open NTP with Following feed selected
Upon following a site, a snackbar appears with a "Go to feed" button. This button now opens the NTP with the Following feed selected, scrolled to the feed. This is achieved using the NTPHelper which can be used to set startup properties for the next opened NTP. Renames existing NewTabPageCommands to NewTabPageDelegate, since we are now adding a new NewTabPageCommands in ui/commands. Tests cannot be added for now since Bling doesn't support WPR yet. Downstream CL: https://crrev.com/i/4651875 Bug: 1264872 Change-Id: I9ea9cfee1853f296baffe33bc5daf17e2fd92e0c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3558809 Reviewed-by: Tina Wang <tinazwang@chromium.org> Reviewed-by: Sergio Collazos <sczs@chromium.org> Commit-Queue: Adam Arcaro <adamta@google.com> Cr-Commit-Position: refs/heads/main@{#989046}
- Loading branch information
adamta
authored and
Chromium LUCI CQ
committed
Apr 5, 2022
1 parent
43c7dd3
commit b71ad7a
Showing
16 changed files
with
209 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright 2022 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef IOS_CHROME_BROWSER_UI_COMMANDS_NEW_TAB_PAGE_COMMANDS_H_ | ||
#define IOS_CHROME_BROWSER_UI_COMMANDS_NEW_TAB_PAGE_COMMANDS_H_ | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
#include "ios/chrome/browser/discover_feed/feed_constants.h" | ||
|
||
// Commands related to the new tab page. | ||
@protocol NewTabPageCommands | ||
|
||
// Opens a new tab page scrolled into the feed with a given |feedType| selected. | ||
- (void)openNTPScrolledIntoFeedType:(FeedType)feedType; | ||
|
||
@end | ||
|
||
#endif // IOS_CHROME_BROWSER_UI_COMMANDS_NEW_TAB_PAGE_COMMANDS_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright 2022 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_CONFIGURING_H_ | ||
#define IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_CONFIGURING_H_ | ||
|
||
#include "ios/chrome/browser/discover_feed/feed_constants.h" | ||
|
||
// Protocol containing the properties to configure the NTP. | ||
@protocol NewTabPageConfiguring | ||
|
||
// Currently selected feed. | ||
@property(nonatomic, assign) FeedType selectedFeed; | ||
|
||
// Whether the NTP should initially be scrolled into the feed. | ||
@property(nonatomic, assign) BOOL shouldScrollIntoFeed; | ||
|
||
@end | ||
|
||
#endif // IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_CONFIGURING_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.