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 more feedback! Created Jan. 26, 2016, 3 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
« lib/icon.js ('K') | « 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..7d97aeb36857ac40565dfaa6e64d6a58fc25f1bb 100644
--- a/safari/ext/background.js
+++ b/safari/ext/background.js
@@ -154,6 +154,10 @@
if (!(event.target instanceof SafariBrowserTab))
return;
+ var activeTab = event.target.browserWindow.activeTab;
+ var pageId = addPage(activeTab, activeTab.url, false);
Sebastian Noack 2016/01/26 16:12:38 Add page registers a new page (in our data structu
kzar 2016/01/26 22:59:30 Acknowledged.
+ ext.pages.onActivated._dispatch(pages[pageId]);
+
// 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
@@ -171,7 +175,7 @@
{
this._id = id;
this._tab = tab;
- this._frames = [{url: new URL(url), parent: null}];
+ this._frames = [{url: new URL(url || "about:blank"), parent: null}];
Sebastian Noack 2016/01/26 16:12:37 This change seems to be unrelated.
Sebastian Noack 2016/01/26 22:44:50 It seems that you forgot to reply here. At least t
kzar 2016/01/26 22:59:30 Whoops, you're right. Somehow in the past I was se
if (tab.page)
this._messageProxy = new ext._MessageProxy(tab.page);
@@ -293,7 +297,8 @@
callback(matchedPages);
},
- onLoading: new ext._EventTarget()
+ onLoading: new ext._EventTarget(),
+ onActivated: new ext._EventTarget(),
};
safari.application.addEventListener("close", function(event)
« lib/icon.js ('K') | « metadata.safari ('k') | safari/icons/abp-16.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld