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

Unified Diff: chrome/ext/background.js

Issue 29338187: Issue 3696 - Fall back to tabs.create if windows.create isn't available (Closed)
Patch Set: Check only existence, not the type Created March 14, 2016, 9:32 a.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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/ext/background.js
===================================================================
--- a/chrome/ext/background.js
+++ b/chrome/ext/background.js
@@ -594,10 +594,16 @@
ext.windows = {
create: function(createData, callback)
{
- chrome.windows.create(createData, function(createdWindow)
+ if ("create" in chrome.windows){
+ chrome.windows.create(createData, function(createdWindow)
+ {
+ afterTabLoaded(callback)(createdWindow.tabs[0]);
+ });
+ }
+ else
{
- afterTabLoaded(callback)(createdWindow.tabs[0]);
- });
+ ext.pages.open(createData.url, callback);
+ }
}
};
})();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld