I figured out how to do this so I'll share it here in case someone else runs into the same problem.
1. I establish a connection between the page in my devtools panel and the event page. To do this you'd use chrome.runtime.onConnect on the event page side and chrome.runtime.connect() on the devtools side, see
http://developer.chrome.com/extensions/messaging.html for more.
2. On the event page side, when a connection is made, I listen for port.onDisconnect - one the port is disconnected, I know the devtools panel must have been closed.
Toby