Commit 75d7f6aa authored by Danan S's avatar Danan S Committed by Commit Bot

Add kFromParentalControls app launch source to app service.

This is needed for apps launched from the Settings Parental Controls.
For the ARC equivalent, we map this to arc::UserInteractionType::APP_STARTED_FROM_SETTINGS

Bug: 937995
Change-Id: Ie953e6309bb705ca7be17be284050bbca0880b85
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1613960
Commit-Queue: Danan S <danan@chromium.org>
Reviewed-by: default avatarDominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#661060}
parent 0029115f
......@@ -281,6 +281,9 @@ void ArcApps::Launch(const std::string& app_id,
case apps::mojom::LaunchSource::kFromKioskNextHome:
uit = arc::UserInteractionType::APP_STARTED_FROM_KIOSK_NEXT_HOME;
break;
case apps::mojom::LaunchSource::kFromParentalControls:
uit = arc::UserInteractionType::APP_STARTED_FROM_SETTINGS;
break;
}
arc::LaunchApp(profile_, app_id, event_flags, uit, display_id);
......
......@@ -143,6 +143,7 @@ void BuiltInChromeOsApps::Launch(const std::string& app_id,
switch (launch_source) {
case apps::mojom::LaunchSource::kUnknown:
case apps::mojom::LaunchSource::kFromKioskNextHome:
case apps::mojom::LaunchSource::kFromParentalControls:
break;
case apps::mojom::LaunchSource::kFromAppListGrid:
case apps::mojom::LaunchSource::kFromAppListGridContextMenu:
......
......@@ -167,6 +167,7 @@ void ExtensionApps::Launch(const std::string& app_id,
switch (launch_source) {
case apps::mojom::LaunchSource::kUnknown:
case apps::mojom::LaunchSource::kFromKioskNextHome:
case apps::mojom::LaunchSource::kFromParentalControls:
break;
case apps::mojom::LaunchSource::kFromAppListGrid:
case apps::mojom::LaunchSource::kFromAppListGridContextMenu:
......
......@@ -14,6 +14,7 @@ ash::ShelfLaunchSource ConvertLaunchSource(
switch (launch_source) {
case apps::mojom::LaunchSource::kUnknown:
case apps::mojom::LaunchSource::kFromKioskNextHome:
case apps::mojom::LaunchSource::kFromParentalControls:
return ash::LAUNCH_FROM_UNKNOWN;
case apps::mojom::LaunchSource::kFromAppListGrid:
case apps::mojom::LaunchSource::kFromAppListGridContextMenu:
......
......@@ -153,6 +153,7 @@ enum LaunchSource {
kFromAppListQueryContextMenu, // Query-dependent results; context menu.
kFromAppListRecommendation, // Query-less recommendations (smaller icons).
kFromKioskNextHome, // Kiosk Next Home app.
kFromParentalControls, // Parental Controls Settings Section.
};
enum TriState {
......
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