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

Unified Diff: safari/ext/background.js

Issue 29336084: Issue 2426 - Open block.html as a popup window (Closed)
Patch Set: Open block.html as a popup window Created Feb. 8, 2016, 12:32 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
Index: safari/ext/background.js
diff --git a/safari/ext/background.js b/safari/ext/background.js
index 2c3d5ec9aa8fd4b992efd1e8d38e493cc21b2ca5..706a76b684d3bf7cb8d007cd288751dba107b0ca 100644
--- a/safari/ext/background.js
+++ b/safari/ext/background.js
@@ -222,6 +222,8 @@
var forgetPage = function(id)
{
+ ext.pages.onRemoved._dispatch(id);
+
ext._removeFromAllPageMaps(id);
delete pages[id]._tab._pages[id];
@@ -305,6 +307,7 @@
},
onLoading: new ext._EventTarget(),
onActivated: new ext._EventTarget(),
+ onRemoved: new ext._EventTarget()
};
safari.application.addEventListener("close", function(event)
@@ -754,4 +757,15 @@
ext.pages.open(optionsUrl, callback);
};
+
+ /* Windows */
+ ext.windows = {
+ // Safari doesn't provide as rich a windows API as Chrome does, so instead
+ // of chrome.windows.create we have to fall back to just opening a new tab.
+ create: function(createData, callback)
+ {
+ if (createData && createData.url)
Sebastian Noack 2016/02/10 12:26:57 Just assume the URL to be given? If it's missing,
kzar 2016/02/10 14:20:17 Done.
+ ext.pages.open(createData.url, callback);
+ }
+ };
})();

Powered by Google App Engine
This is Rietveld