Bug 1007600 - Support inline activity

https://bugzilla.mozilla.org/show_bug.cgi?id=1007600
For me, L77-L86 is good to make as another private method to make it more easy to test, what do you think ?