New issue
Advanced search Search tips

Issue 916542 link

Starred by 2 users

Issue metadata

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

Blocking:
issue 916516



Sign in to add a comment

Extract CustomTabActiveContentHandler out of CustomTabActivity

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

Issue description

There is a large anonymous inner implementation of BrowserSessionContentHandler in CustomTabActivity - extract it into a separate class, along with the pieces that work with it (see onStartWithNative, onStopWithNative, onNewIntentWithNative).

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

Also, consider what to do with BrowserSessionContentUtils:

a) Since there's only one implementation of BrowserSessionContentHandler, consider merging the BrowserSessionContentUtils into it. In that case we can have lightweight singleton "ActiveContentHandlerHolder", for holding the reference to the current handler, and all the other code will go to an activity-scoped class.

b) Otherwise, consider making BrowserSessionContentUtils an (injectable) singleton, and possibly renaming it.


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

Sign in to add a comment