[iOS][LO] Add flag to force enable landscape support
Change-Id: I7cae6fb33d1f8e0f2503eccc875624de0876d04a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6238238
Reviewed-by: Ameur Hosni <ameurhosni@google.com>
Auto-Submit: Radu Nitescu <radunitescu@google.com>
Commit-Queue: Ameur Hosni <ameurhosni@google.com>
Cr-Commit-Position: refs/heads/main@{#1416854}
NOKEYCHECK=True
GitOrigin-RevId: b3e06f91df5ffcfd0c8c9f38409359eeecaaeb57
diff --git a/chrome/browser/flags/about_flags.mm b/chrome/browser/flags/about_flags.mm
index 8bae682..7e61a47 100644
--- a/chrome/browser/flags/about_flags.mm
+++ b/chrome/browser/flags/about_flags.mm
@@ -2164,6 +2164,11 @@
flag_descriptions::kLensOverlayEnableIPadCompatibilityName,
flag_descriptions::kLensOverlayEnableIPadCompatibilityDescription,
flags_ui::kOsIos, FEATURE_VALUE_TYPE(kLensOverlayEnableIPadCompatibility)},
+ {"lens-overlay-enable-landscape-compatibility",
+ flag_descriptions::kLensOverlayEnableLandscapeCompatibilityName,
+ flag_descriptions::kLensOverlayEnableLandscapeCompatibilityDescription,
+ flags_ui::kOsIos,
+ FEATURE_VALUE_TYPE(kLensOverlayEnableLandscapeCompatibility)},
{"lens-overlay-force-show-onboarding-screen",
flag_descriptions::kLensOverlayForceShowOnboardingScreenName,
flag_descriptions::kLensOverlayForceShowOnboardingScreenDescription,
diff --git a/chrome/browser/flags/ios_chrome_flag_descriptions.cc b/chrome/browser/flags/ios_chrome_flag_descriptions.cc
index aee03c2..eff0d2c 100644
--- a/chrome/browser/flags/ios_chrome_flag_descriptions.cc
+++ b/chrome/browser/flags/ios_chrome_flag_descriptions.cc
@@ -739,6 +739,11 @@
extern const char kLensOverlayEnableIPadCompatibilityDescription[] =
"When enabled, it allows Lens Overlay to run on iPad devices";
+extern const char kLensOverlayEnableLandscapeCompatibilityName[] =
+ "Allow Lens overlay to also run in landscape if the feature is enabled";
+extern const char kLensOverlayEnableLandscapeCompatibilityDescription[] =
+ "When enabled, it allows Lens Overlay to run in landscape orientation";
+
extern const char kLensOverlayEnableLocationBarEntrypointName[] =
"Enable Lens overlay location bar entrypoint.";
extern const char kLensOverlayEnableLocationBarEntrypointDescription[] =
diff --git a/chrome/browser/flags/ios_chrome_flag_descriptions.h b/chrome/browser/flags/ios_chrome_flag_descriptions.h
index 76ffac0..3f0cab4 100644
--- a/chrome/browser/flags/ios_chrome_flag_descriptions.h
+++ b/chrome/browser/flags/ios_chrome_flag_descriptions.h
@@ -643,6 +643,10 @@
extern const char kLensOverlayEnableIPadCompatibilityName[];
extern const char kLensOverlayEnableIPadCompatibilityDescription[];
+// Title and description for the flag to allow lens overlay in landscape.
+extern const char kLensOverlayEnableLandscapeCompatibilityName[];
+extern const char kLensOverlayEnableLandscapeCompatibilityDescription[];
+
// Title and description for the flag to enable the Lens overlay location bar
// entrypoint.
extern const char kLensOverlayEnableLocationBarEntrypointName[];
diff --git a/chrome/browser/shared/public/features/features.h b/chrome/browser/shared/public/features/features.h
index 0e24e78..addce0e 100644
--- a/chrome/browser/shared/public/features/features.h
+++ b/chrome/browser/shared/public/features/features.h
@@ -315,6 +315,9 @@
// Feature to force allow iPad support of lens overlay.
BASE_DECLARE_FEATURE(kLensOverlayEnableIPadCompatibility);
+// Feature to allow landscape support of lens overlay.
+BASE_DECLARE_FEATURE(kLensOverlayEnableLandscapeCompatibility);
+
// Feature to open lens overlay navigation in the same tab.
BASE_DECLARE_FEATURE(kLensOverlayEnableSameTabNavigation);
diff --git a/chrome/browser/shared/public/features/features.mm b/chrome/browser/shared/public/features/features.mm
index 339d9e2..4d772c5 100644
--- a/chrome/browser/shared/public/features/features.mm
+++ b/chrome/browser/shared/public/features/features.mm
@@ -240,6 +240,10 @@
"EnableLensOverlayForceIPadSupport",
base::FEATURE_DISABLED_BY_DEFAULT);
+BASE_FEATURE(kLensOverlayEnableLandscapeCompatibility,
+ "EnableLensOverlayLandscapeSupport",
+ base::FEATURE_DISABLED_BY_DEFAULT);
+
BASE_FEATURE(kLensOverlayEnableLocationBarEntrypoint,
"LensOverlayEnableLocationBarEntrypoint",
base::FEATURE_ENABLED_BY_DEFAULT);