Commit 397151e2 authored by Kurt Horimoto's avatar Kurt Horimoto Committed by Commit Bot

[iOS] Add OverlayModality::kWebContentArea classes.

This CL adds the container coordinator and coordinator factory for the
kWebContentArea modality.

Bug: 941745
Change-Id: Id539be9a3776ed80fc293578cd33394896e71117
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1610095Reviewed-by: default avataredchin <edchin@chromium.org>
Reviewed-by: default avatarMike Dougherty <michaeldo@chromium.org>
Commit-Queue: Kurt Horimoto <kkhorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#664922}
parent a1bd2028
......@@ -15,6 +15,13 @@
// web contents of the browser view.
@interface BrowserContainerCoordinator : ChromeCoordinator
// The BrowserContainerCoordinator must be constructed with a Browser, so the
// ChromeBrowserState initializer is unavailable.
- (instancetype)initWithBaseViewController:(UIViewController*)viewController
browserState:
(ios::ChromeBrowserState*)browserState
NS_UNAVAILABLE;
// The view controller managing the container view.
@property(nonatomic, strong, readonly)
BrowserContainerViewController* viewController;
......
......@@ -222,7 +222,7 @@
- (void)startBrowserContainer {
self.browserContainerCoordinator = [[BrowserContainerCoordinator alloc]
initWithBaseViewController:nil
browserState:self.browserState];
browser:self.browser];
[self.browserContainerCoordinator start];
}
......
......@@ -28,6 +28,7 @@ source_set("overlays") {
"//ios/chrome/browser/main",
"//ios/chrome/browser/overlays",
"//ios/chrome/browser/ui/coordinators:chrome_coordinators",
"//ios/chrome/browser/ui/overlays/web_content_area",
"//ios/chrome/common/ui_util",
]
}
......
......@@ -7,6 +7,7 @@
#include "base/logging.h"
#import "ios/chrome/browser/ui/overlays/overlay_coordinator_factory+initialization.h"
#import "ios/chrome/browser/ui/overlays/overlay_request_coordinator.h"
#import "ios/chrome/browser/ui/overlays/web_content_area/web_content_area_supported_overlay_coordinator_classes.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
......@@ -29,8 +30,8 @@
NSArray<Class>* supportedCoordinatorClasses = @[];
switch (modality) {
case OverlayModality::kWebContentArea:
// TODO(crbug.com/941745): Reset |supportedCoordinatorClasses| to contain
// OverlayRequestCoordinator classes once implemented.
supportedCoordinatorClasses =
web_content_area::GetSupportedOverlayCoordinatorClasses();
break;
}
return [[self alloc] initWithBrowser:browser
......
# Copyright 2019 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.
source_set("web_content_area") {
public = [
"web_content_area_supported_overlay_coordinator_classes.h",
]
sources = [
"web_content_area_supported_overlay_coordinator_classes.mm",
]
configs += [ "//build/config/compiler:enable_arc" ]
deps = [
"//base",
"//ios/chrome/browser/ui/overlays:coordinators",
]
}
// Copyright 2019 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_OVERLAYS_WEB_CONTENT_AREA_WEB_CONTENT_AREA_SUPPORTED_OVERLAY_COORDINATOR_CLASSES_H_
#define IOS_CHROME_BROWSER_UI_OVERLAYS_WEB_CONTENT_AREA_WEB_CONTENT_AREA_SUPPORTED_OVERLAY_COORDINATOR_CLASSES_H_
#import <Foundation/Foundation.h>
namespace web_content_area {
// Returns the supported OverlayRequestCoordinator classes for
// OverlayModality::kWebContentArea.
NSArray<Class>* GetSupportedOverlayCoordinatorClasses();
} // web_content_area
#endif // IOS_CHROME_BROWSER_UI_OVERLAYS_WEB_CONTENT_AREA_WEB_CONTENT_AREA_SUPPORTED_OVERLAY_COORDINATOR_CLASSES_H_
// Copyright 2019 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.
#import "ios/chrome/browser/ui/overlays/web_content_area/web_content_area_supported_overlay_coordinator_classes.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
namespace web_content_area {
NSArray<Class>* GetSupportedOverlayCoordinatorClasses() {
// TODO(crbug.com/941745): Add more supported overlay coordinator classes.
return @[];
}
} // web_content_area
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