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

Unified Diff: chrome/background.js

Issue 6369485355220992: Fixed reload issue in Chrome (Closed)
Patch Set: Created Nov. 15, 2013, 1:08 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 | « background.js ('k') | safari/background.js » ('j') | safari/background.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/background.js
===================================================================
--- a/chrome/background.js
+++ b/chrome/background.js
@@ -99,17 +99,17 @@
}
};
- var BeforeNavigateTabEventTarget = function()
+ var LoadingTabEventTarget = function()
{
TabEventTarget.call(this, chrome.tabs.onUpdated);
};
- BeforeNavigateTabEventTarget.prototype = {
+ LoadingTabEventTarget.prototype = {
__proto__: TabEventTarget.prototype,
_wrapListener: function(listener)
{
return function(id, info, tab)
{
- if ("url" in info)
+ if (info.status == "loading")
listener(new Tab(tab));
};
}
@@ -224,7 +224,7 @@
this.url = tab.url;
this.pageAction = new PageAction(tab.id);
- this.onBeforeNavigate = ext.tabs.onBeforeNavigate._bindToTab(this);
+ this.onLoading = ext.tabs.onLoading._bindToTab(this);
this.onCompleted = ext.tabs.onCompleted._bindToTab(this);
this.onActivated = ext.tabs.onActivated._bindToTab(this);
this.onRemoved = ext.tabs.onRemoved._bindToTab(this);
@@ -338,7 +338,7 @@
};
ext.tabs = {
- onBeforeNavigate: new BeforeNavigateTabEventTarget(),
+ onLoading: new LoadingTabEventTarget(),
onCompleted: new CompletedTabEventTarget(),
onActivated: new ActivatedTabEventTarget(),
onRemoved: new RemovedTabEventTarget()
« no previous file with comments | « background.js ('k') | safari/background.js » ('j') | safari/background.js » ('J')

Powered by Google App Engine
This is Rietveld