New issue
Advanced search Search tips

Issue 916536 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Task

Blocked on:
issue 916518

Blocking:
issue 916516



Sign in to add a comment

Extract CustomTabsPostMessageController out of CustomTabActivity

Project Member Reported by pshmakov@google.com, Dec 19

Issue description

Extract the code related to postMessage out of CustomTabActivity and DynamicModuleCoordinator into a CustomTabsPostMessageController. It should track the tab changes using CustomTabActivityNavigationController (https://crbug/916518) and reset the postMessage handler accordingly, and provide the API for the clients. It shouldn't know about particular clients though; e.g. there shouldn't be mentions of the dynamic module.

See CustomTabsPostMessageController.java in https://crrev.com/1371805 for a rough idea how this class may look like.

Make DynamicModuleCoordinator and TrustedWebActivityCoordinator use 
CustomTabsPostMessageController. In TWAs there's a couple of postMessage-related lines of code in TrustedWebActivityVerifier - move them into TrustedWebActivityCoordinator and make them use the new class.

Ensure the class is testable, write tests if there are any non-trivial edge-cases.

This is a part of CustomTabActivity refactoring plan described in
https://docs.google.com/document/d/1E9u-9eSFjLwVnUUIekhurmKk-8vsSDxek7cZiFd6ToY

 
Blocking: 916516
Description: Show this description

Sign in to add a comment