Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: safari/ext/background.js

Issue 29334223: Issue 3532 - Generate animation images at runtime (Closed)
Patch Set: Addressed final nits Created Jan. 26, 2016, 10:57 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « metadata.safari ('k') | safari/icons/abp-16.png » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: safari/ext/background.js
diff --git a/safari/ext/background.js b/safari/ext/background.js
index e154aff029b37cedb5b06df6ed19f287e003aa48..0c8efbf35b690dded212be2322ff7265f22a7075 100644
--- a/safari/ext/background.js
+++ b/safari/ext/background.js
@@ -154,11 +154,15 @@
if (!(event.target instanceof SafariBrowserTab))
return;
+ let visiblePage = event.target._visiblePage;
+ if (visiblePage)
+ ext.pages.onActivated._dispatch(visiblePage);
+
// update the toolbar item for the page visible in the tab that just
// became active. If we can't find that page (e.g. when a page was
// opened in a new tab, and our content script didn't run yet), the
// toolbar item of the window, is reset to its intial configuration.
- updateToolbarItemForPage(event.target._visiblePage, event.target.browserWindow);
+ updateToolbarItemForPage(visiblePage, event.target.browserWindow);
}, true);
@@ -293,7 +297,8 @@
callback(matchedPages);
},
- onLoading: new ext._EventTarget()
+ onLoading: new ext._EventTarget(),
+ onActivated: new ext._EventTarget(),
};
safari.application.addEventListener("close", function(event)
« no previous file with comments | « metadata.safari ('k') | safari/icons/abp-16.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld