Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4699)

Unified Diff: ceee/firefox/modules/global.js

Issue 5277004: Add implementation of tabs.getCurrent() API, and correct implementation of... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ceee/firefox/content/window_api.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ceee/firefox/modules/global.js
===================================================================
--- ceee/firefox/modules/global.js (revision 67259)
+++ ceee/firefox/modules/global.js (working copy)
@@ -142,6 +142,25 @@
};
/**
+ * Find the window with the given a Chrome Frame session id.
+ *
+ * @param {number} id The Chrome Frame session Id of the window to find.
+ * @return The window that contains the Chrome Frame instance with the
+ * specified session Id, or null if no window is found.
+ * @public
+ */
+CEEE_mozilla_windows.findWindowFromCfSessionId = function(id) {
+ var e = this.service.getEnumerator(this.WINDOW_TYPE);
+ while (e.hasMoreElements()) {
+ var win = e.getNext();
+ var cf = win.document.getElementById(CEEE_globals.CHROME_FRAME_ID);
+ if (cf.sessionid == id)
+ return win;
+ }
+ return null;
+};
+
+/**
* Global object used as a place-holder for API routines accessing the Mozilla
* tabs interface.
* @public
@@ -377,6 +396,12 @@
/** @const */ MAIN_BROWSER_ID: 'content',
/** @const */ ADDON_ID: 'ceee@google.com',
+ /**
+ * Value used for id attribute of the ChromeFrame <embed> element.
+ * @const
+ */
+ CHROME_FRAME_ID: 'ceee-browser',
+
/** The integer id for the next window. @private */
nextWindowId_: 0,
« no previous file with comments | « ceee/firefox/content/window_api.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698