Revert of [Webapp Refactor] Remove remoting.SessionConnector. (patchset #3 id:60001...
commitcb655c2ca0a46c9402c65e74ef736037ed6bd3a8
authorkelvinp <kelvinp@chromium.org>
Sat, 18 Apr 2015 00:39:45 +0000 (17 17:39 -0700)
committerCommit bot <commit-bot@chromium.org>
Sat, 18 Apr 2015 00:40:06 +0000 (18 00:40 +0000)
tree54f7fcd1e364cf61b345b565936f33cb449484fa
parent9bb592340bc912b5c8d09432b139e04aa8713842
Revert of [Webapp Refactor] Remove remoting.SessionConnector. (patchset #3 id:60001 of https://codereview.chromium.org/1047413006/)

Reason for revert:
Bad merge with a previous version that will cause compilation failure.

Original issue's description:
> [Webapp Refactor] Remove remoting.SessionConnector.
>
> 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
>
> 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/4c69287fc3e0ad6663ab98f02ef57c570f8992e3
> Cr-Commit-Position: refs/heads/master@{#325745}

TBR=jamiewalch@chromium.org,garykac@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=477522

Review URL: https://codereview.chromium.org/1096883002

Cr-Commit-Position: refs/heads/master@{#325748}
14 files changed:
remoting/remoting_webapp_files.gypi
remoting/webapp/app_remoting/js/app_remoting_activity.js
remoting/webapp/base/js/application.js
remoting/webapp/base/js/protocol_extension.js
remoting/webapp/crd/js/client_session.js
remoting/webapp/crd/js/client_session_factory.js [deleted file]
remoting/webapp/crd/js/client_session_factory_unittest.js [deleted file]
remoting/webapp/crd/js/desktop_remoting_activity.js
remoting/webapp/crd/js/it2me_activity.js
remoting/webapp/crd/js/me2me_activity.js
remoting/webapp/crd/js/mock_client_plugin.js
remoting/webapp/crd/js/mock_session_connector.js [new file with mode: 0644]
remoting/webapp/crd/js/session_connector.js [new file with mode: 0644]
remoting/webapp/crd/js/session_connector_impl.js [new file with mode: 0644]