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

Unified Diff: chrome/ext/background.js

Issue 5981059543990272: Issue 1820 - Fixed issue where multiple tabs were highlghited (Closed)
Patch Set: Created Jan. 16, 2015, 12:28 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 | « 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
@@ -48,7 +48,16 @@
},
activate: function()
{
- chrome.tabs.update(this._id, {highlighted: true});
+ chrome.tabs.get(this._id, function(tab)
+ {
+ chrome.tabs.highlight(
+ {
+ windowId: tab.windowId,
+ tabs: [tab.index]
Wladimir Palant 2015/01/16 15:59:17 I wonder why they created an API that works with t
+ },
+ function() {}
+ );
+ });
},
sendMessage: function(message, responseCallback)
{
@@ -423,7 +432,13 @@
var tab = tabs[0];
chrome.windows.update(tab.windowId, {focused: true});
- chrome.tabs.update(tab.id, {highlighted: true});
+ chrome.tabs.highlight(
+ {
+ windowId: tab.windowId,
+ tabs: [tab.index]
+ },
+ function() {}
+ );
if (callback)
callback(new Page(tab));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld