Commit 45d37408 authored by gogerald's avatar gogerald Committed by Commit Bot

Support open urls and other operations in multiple windows

The counterpart CL in downstream is
https://chrome-internal-review.googlesource.com/c/chrome/ios_internal/+/3180818

Bug: 1085419
Change-Id: I3e20df0bb93d47009cdaa30896c52c8c648b05a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2315432Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Commit-Queue: Ganggui Tang <gogerald@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791487}
parent b92b009d
......@@ -167,11 +167,9 @@
ReadingListModelFactory::GetForBrowserState(
self.browser->GetBrowserState());
self.discoverFeedViewController =
ios::GetChromeBrowserProvider()
->GetDiscoverFeedProvider()
->NewFeedViewController(static_cast<id<ApplicationCommands>>(
self.browser->GetCommandDispatcher()));
self.discoverFeedViewController = ios::GetChromeBrowserProvider()
->GetDiscoverFeedProvider()
->NewFeedViewController(self.browser);
// TODO(crbug.com/1085419): Once the CollectionView is cleanly exposed, remove
// this loop.
......
......@@ -10,6 +10,7 @@
#include "base/ios/block_types.h"
@protocol ApplicationCommands;
class Browser;
// DiscoverFeedProvider allows embedders to provide functionality for a Discover
// Feed.
......@@ -24,8 +25,14 @@ class DiscoverFeedProvider {
// Returns true if the Discover Feed is enabled.
virtual bool IsDiscoverFeedEnabled();
// Returns the Discover Feed ViewController.
// Deprecated - use the below NewFeedViewController(Browser* browser) instead.
// TODO(crbug.com/1085419): Remove this interface after rolling the downstream
// change.
virtual UIViewController* NewFeedViewController(
id<ApplicationCommands> handler) NS_RETURNS_RETAINED;
// Returns the Discover Feed ViewController.
virtual UIViewController* NewFeedViewController(Browser* browser)
NS_RETURNS_RETAINED;
// Updates the feed's theme to match the user's theme (light/dark).
virtual void UpdateTheme();
// Refreshes the Discover Feed with completion.
......
......@@ -17,6 +17,11 @@ UIViewController* DiscoverFeedProvider::NewFeedViewController(
return nil;
}
UIViewController* DiscoverFeedProvider::NewFeedViewController(
Browser* browser) {
return nil;
}
void DiscoverFeedProvider::UpdateTheme() {}
void DiscoverFeedProvider::RefreshFeedWithCompletion(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment