このtabs API関連のイベントリスナーもBackgroundかEvent Pagesからだいたい使うので、テンプレート化した。
// On tab created (Note that the tab's URL may not be set at the time this event fired.)
chrome.tabs.onCreated.addListener(function(tab) {
});
// On tab updated
chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {
  if (changeInfo.status == "loading") {
  } else if (changeInfo.status == "complete") {
  }
});
// On tab removed
chrome.tabs.onRemoved.addListener(function(tabId) {
});
注意点
onCreated発生時点ではtabにurlがセットされていない(ことが多い)ので、urlを必要とする処理はonUpdatedで行う。onUpdatedでは1ページのロードでloadingとcompleteの2回発生するので、changeInfo.statusを見ておかないと重複して実行される。