base.EventHook
commitc67ab01d1b437f04de1441160ba013bb37ceffc2
authorkelvinp <kelvinp@chromium.org>
Tue, 3 Feb 2015 06:14:26 +0000 (2 22:14 -0800)
committerCommit bot <commit-bot@chromium.org>
Tue, 3 Feb 2015 06:15:15 +0000 (3 06:15 +0000)
tree78aeabddae2edd3525b12d9ef6cf45a35e88ecea
parent861230ece8eb56fe835283b9fba9a538f26ab582
base.EventHook

Currently most objects in the Chromoting Webapp doesn't unhook events until
the page is unloaded.  This introduces unintentional coupling between an object's
lifetime and the app's lifetime.

This CL implements a lightweight utility class to make unhooking listeners easier.

BUG=454552

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

Cr-Commit-Position: refs/heads/master@{#314278}
remoting/remoting_webapp_files.gypi
remoting/webapp/base/js/base.js
remoting/webapp/unittests/event_hook_unittest.js [new file with mode: 0644]