~justinmcp/unity-chromium-extension/13.10

« back to all changes in this revision

Viewing changes to chromium-extension/content/unity-view-manager.js

  • Committer: Tarmac
  • Author(s): Alexandre Abreu
  • Date: 2013-07-11 18:50:30 UTC
  • mfrom: (224.1.2 fix-chromium-28-support)
  • Revision ID: tarmac-20130711185030-rgajj7lnqnjgblt8
Fix issue w/ installation (when message is being sent to background page from infobar, the sender.tab object is not set); updated some apis to newer versions. Fixes: https://bugs.launchpad.net/bugs/1196943.

Approved by Víctor R. Ruiz, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
    this.plugin = plugin;
5
5
 
6
6
    this.currentTabId = null;
7
 
    chrome.extension.sendRequest ("get_this_tab", function (response) {
 
7
    chrome.runtime.sendRequest ("get_this_tab", function (response) {
8
8
        this.currentTabId = response.tabId;
9
9
    });
10
10
 
11
11
    this.isWindowCurrentlySelected = true;
12
 
    chrome.extension.onRequest.addListener (function (request, sender, response) {
 
12
    chrome.runtime.onRequest.addListener (function (request, sender, response) {
13
13
        if (request.method && request.method === "on_tab_active_changed") {
14
14
            console.log ("From content script: tab id changed " + request.tabId);
15
15
            this.isWindowCurrentlySelected = (this.currentTabId === request.tabId);