Chromium Code Reviews| Index: chrome/browser/ui/app_list/arc/arc_app_utils.cc |
| diff --git a/chrome/browser/ui/app_list/arc/arc_app_utils.cc b/chrome/browser/ui/app_list/arc/arc_app_utils.cc |
| index 651bbb810361a9124fd6892fb53364398162094d..3131b01557a13fef650ab16100dd0e4078921f44 100644 |
| --- a/chrome/browser/ui/app_list/arc/arc_app_utils.cc |
| +++ b/chrome/browser/ui/app_list/arc/arc_app_utils.cc |
| @@ -30,6 +30,7 @@ constexpr int kNexus5Height = 690; |
| // Minimum required versions. |
| constexpr int kMinVersion = 0; |
| constexpr int kCanHandleResolutionMinVersion = 1; |
| +constexpr int kSendBroadcastMinVersion = 1; |
| constexpr int kUninstallPackageMinVersion = 2; |
| constexpr int kShowPackageInfoMinVersion = 5; |
| constexpr int kRemoveIconMinVersion = 9; |
| @@ -227,6 +228,32 @@ bool LaunchApp(content::BrowserContext* context, |
| ->LaunchAndRelease(); |
| } |
| +bool ShowTalkBackSettings() { |
| + arc::ArcBridgeService* bridge_service = arc::ArcBridgeService::Get(); |
| + if (!bridge_service) { |
| + VLOG(2) << "ARC bridge is not ready"; |
| + return false; |
| + } |
| + |
| + arc::mojom::IntentHelperInstance *intent_helper_instance = |
| + bridge_service->intent_helper()->instance(); |
| + if (!intent_helper_instance) { |
| + VLOG(2) << "ARC intent helper instance is not ready"; |
| + return false; |
| + } |
| + if (bridge_service->intent_helper()->version() < kSendBroadcastMinVersion) { |
| + VLOG(2) << "ARC intent helper instance is too old"; |
| + return false; |
| + } |
| + |
| + intent_helper_instance->SendBroadcast( |
| + "org.chromium.arc.intent_helper.SHOW_TALKBACK_SETTINGS", |
| + "org.chromium.arc.intent_helper", |
| + "org.chromium.arc.intent_helper.SettingsReceiver", |
| + "{}"); |
| + return true; |
|
stevenjb
2016/08/08 22:41:03
Do we actually use the result anywhere? If not we
yhanada
2016/08/09 06:29:40
Done.
|
| +} |
| + |
| bool CanHandleResolution(content::BrowserContext* context, |
| const std::string& app_id, |
| const gfx::Rect& rect, |