Description[Webapp Refactor] Remove remoting.SessionConnector.
This is a reland of crrev.com/1047413006
remoting.SessionConnector is currently responsible for creating
the plugin, the signal strategy and the clientSession. It also
magically disposes the plugin when the clientSession finishes.
However, the session is not exposed to the caller elsewhere, which makes
it hard for the caller to dispose of the session before it is connected,
e.g. Cancel a PIN entry.
It is currently a stateful object that keeps track of the host,
credentials provider, strategy of the created session, which is redundant.
This CL
1. Offloads the creation of the clientSession to the
remoting.ClientSessionFactory. It also allow the caller to configure
a clientSession prior to connecting. The remoting.ClientSessionFactory
is essentially stateless except for a few predefined ClientSession
construction parameters.
2. Allow the caller to have a different instance of
ClientSession.EventHandler for each instance ClientSession created.
3. Revives remoting.MockClientPlugin and uses it for remoting.ClientSessionFactory
unittests.
Ownership graph before:
Activity -> SessionConenctor -> ClientSession
Ownership graph after:
Activity -> ClientSession
TBR=jamiewalch
BUG=477522
TEST=All browser tests passed on
https://chromium-swarm.appspot.com/user/tasks?sort=created_ts&state=all&limit=10&task_name=chromoting_integration_tests
Committed: https://crrev.com/2c5de34072226c91d465349cb249d76d16387bef
Cr-Commit-Position: refs/heads/master@{#325887}
Patch Set 1 : Original CL #Patch Set 2 : Fix merge conflicts #Messages
Total messages: 6 (3 generated)
|