Commit e9d47515 authored by Mark Cogan's avatar Mark Cogan Committed by Commit Bot

[iOS] Add gn-argument-gated plist/storyboard for multi-window.

This CL set up the iOS app configuration needed for multi-window. This
includes (a) a bunch of specific Info.plist additions, and (b) a
storyboard file to be used as a default by each scene.

These files are added if the gn argument ios_enable_multi_window is
set to 'true'. By default it is 'false'. Note that enabling this arg
will, in Chromium's current state, cause the app to launch with an empty
window and do nothing (because there's no class to load as the scene
delegate). Follow-up CLs will fill that gap, but they need the plist and
storyboard in place first.

Change-Id: I61e153cd2d5d5df12bbd6347151f864e44a2d4ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1782815
Commit-Queue: Mark Cogan <marq@chromium.org>
Reviewed-by: default avatarStepan Khapugin <stkhapugin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#693137}
parent e49d87b9
...@@ -14,6 +14,9 @@ declare_args() { ...@@ -14,6 +14,9 @@ declare_args() {
# Enable share extension. # Enable share extension.
ios_enable_share_extension = true ios_enable_share_extension = true
# Enable multi-window configuration in Info.plist
ios_enable_multi_window = false
# Value of the encryption export compliance code. See "Cryptography and # Value of the encryption export compliance code. See "Cryptography and
# U.S. Export Compliance" in "Submitting the App to App Review" in the # U.S. Export Compliance" in "Submitting the App to App Review" in the
# Apple developer documentation (https://goo.gl/yv1xEF). # Apple developer documentation (https://goo.gl/yv1xEF).
......
...@@ -103,6 +103,9 @@ tweak_info_plist("info_plist") { ...@@ -103,6 +103,9 @@ tweak_info_plist("info_plist") {
if (ios_encryption_export_compliance_code != "") { if (ios_encryption_export_compliance_code != "") {
info_plists += [ "resources/EncryptionExportCompliance+Info.plist" ] info_plists += [ "resources/EncryptionExportCompliance+Info.plist" ]
} }
if (ios_enable_multi_window) {
info_plists += [ "resources/MultiWindow+Info.plist" ]
}
args = [ args = [
"--breakpad=$breakpad_enabled_as_int", "--breakpad=$breakpad_enabled_as_int",
"--branding=$chromium_short_name", "--branding=$chromium_short_name",
......
...@@ -6,6 +6,7 @@ import("//build/config/chrome_build.gni") ...@@ -6,6 +6,7 @@ import("//build/config/chrome_build.gni")
import("//build/config/ios/asset_catalog.gni") import("//build/config/ios/asset_catalog.gni")
import("//build/config/ios/rules.gni") import("//build/config/ios/rules.gni")
import("//build/config/locales.gni") import("//build/config/locales.gni")
import("//ios/build/chrome_build.gni")
import("//ios/chrome/app/resources/ios_chrome_repack.gni") import("//ios/chrome/app/resources/ios_chrome_repack.gni")
import("//ios/chrome/tools/strings/generate_localizable_strings.gni") import("//ios/chrome/tools/strings/generate_localizable_strings.gni")
import("//ios/public/provider/chrome/browser/build_config.gni") import("//ios/public/provider/chrome/browser/build_config.gni")
...@@ -120,6 +121,14 @@ group("launchscreen_assets") { ...@@ -120,6 +121,14 @@ group("launchscreen_assets") {
] ]
} }
if (ios_enable_multi_window) {
# Multi window requires both additional plist entries (handled in ../BUILD.gn) and
# an additional storyboard file.
bundle_data_ib_file("base_scene_storyboard") {
source = "BaseScene.storyboard"
}
}
bundle_data_ib_file("launchscreen_xib") { bundle_data_ib_file("launchscreen_xib") {
source = "LaunchScreen.xib" source = "LaunchScreen.xib"
deps = [ deps = [
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14810.11" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="j72-TL-eGS">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14766.13"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="y1s-8x-hYa">
<objects>
<viewController id="j72-TL-eGS" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="6ef-rW-4AQ">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="YKv-hL-i1m"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="qZ4-fB-fJ8" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-732" y="75"/>
</scene>
</scenes>
</document>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<true/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneClassName</key>
<string>UIWindowScene</string>
<key>UISceneDelegateClassName</key>
<string>SceneController</string>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UISceneStoryboardFile</key>
<string>BaseScene</string>
</dict>
</array>
</dict>
</dict>
</dict>
</plist>
\ No newline at end of file
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