| Index: ios/clean/chrome/browser/ui/web_contents/web_coordinator.mm
|
| diff --git a/ios/clean/chrome/browser/ui/web_contents/web_coordinator.mm b/ios/clean/chrome/browser/ui/web_contents/web_coordinator.mm
|
| index 6198cab7d5b55770b97724151373fdd9f7165066..2ff4c03b9123cf27368ded9d6dcd1c1a0dfd06f7 100644
|
| --- a/ios/clean/chrome/browser/ui/web_contents/web_coordinator.mm
|
| +++ b/ios/clean/chrome/browser/ui/web_contents/web_coordinator.mm
|
| @@ -9,6 +9,8 @@
|
| #import "ios/clean/chrome/browser/ui/commands/context_menu_commands.h"
|
| #import "ios/clean/chrome/browser/ui/context_menu/context_menu_context_impl.h"
|
| #import "ios/clean/chrome/browser/ui/context_menu/web_context_menu_coordinator.h"
|
| +#import "ios/clean/chrome/browser/ui/overlay_service/overlay_service.h"
|
| +#import "ios/clean/chrome/browser/ui/overlay_service/overlay_service_factory.h"
|
| #import "ios/clean/chrome/browser/ui/web_contents/web_contents_mediator.h"
|
| #import "ios/clean/chrome/browser/ui/web_contents/web_contents_view_controller.h"
|
| #import "ios/shared/chrome/browser/ui/browser_list/browser.h"
|
| @@ -27,6 +29,7 @@ @interface WebCoordinator ()<ContextMenuCommands, CRWWebStateDelegate> {
|
| }
|
| @property(nonatomic, strong) WebContentsViewController* viewController;
|
| @property(nonatomic, strong) WebContentsMediator* mediator;
|
| +
|
| @end
|
|
|
| @implementation WebCoordinator
|
| @@ -50,13 +53,23 @@ - (void)setWebState:(web::WebState*)webState {
|
| }
|
|
|
| - (void)start {
|
| + // Create the view controller and start it.
|
| self.viewController = [[WebContentsViewController alloc] init];
|
| self.mediator.consumer = self.viewController;
|
| self.mediator.webStateList = &self.browser->web_state_list();
|
| [super start];
|
| + // Notify the OverlayService that this coordinator is displaying |webState|.
|
| + OverlayServiceFactory::GetInstance()
|
| + ->GetForBrowserState(self.browser->browser_state())
|
| + ->SetWebStateParentCoordinator(self, self.webState);
|
| }
|
|
|
| - (void)stop {
|
| + // Notify the OverlayService that this coordinator is no longer displaying
|
| + // |webState|.
|
| + OverlayServiceFactory::GetInstance()
|
| + ->GetForBrowserState(self.browser->browser_state())
|
| + ->SetWebStateParentCoordinator(nil, self.webState);
|
| [super stop];
|
| [self.mediator disconnect];
|
| }
|
|
|