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

Unified Diff: extensions/renderer/resources/runtime_custom_bindings.js

Issue 2105033003: tabId support to chrome.extensions.getViews() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tests added Created 4 years, 5 months 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
Index: extensions/renderer/resources/runtime_custom_bindings.js
diff --git a/extensions/renderer/resources/runtime_custom_bindings.js b/extensions/renderer/resources/runtime_custom_bindings.js
index ac03a04df5696b4be225d4c1cac002af1fa8871e..0fd4916bdcb77a2f623e1f79ecf3bc335ac39f55 100644
--- a/extensions/renderer/resources/runtime_custom_bindings.js
+++ b/extensions/renderer/resources/runtime_custom_bindings.js
@@ -31,7 +31,7 @@ if (contextType == 'BLESSED_EXTENSION' ||
if (manifest.app && manifest.app.background) {
// Get the background page if one exists. Otherwise, default to the current
// window.
- backgroundPage = runtimeNatives.GetExtensionViews(-1, 'BACKGROUND')[0];
+ backgroundPage = runtimeNatives.GetExtensionViews(-1, 'BACKGROUND', -1)[0];
if (backgroundPage) {
var GetModuleSystem = requireNative('v8_context').GetModuleSystem;
backgroundRequire = GetModuleSystem(backgroundPage).require;
@@ -177,7 +177,8 @@ binding.registerCustomHook(function(binding, id, contextType) {
apiFunctions.setCustomCallback('getBackgroundPage',
function(name, request, callback, response) {
if (callback) {
- var bg = runtimeNatives.GetExtensionViews(-1, 'BACKGROUND')[0] || null;
+ var bg = runtimeNatives.GetExtensionViews(-1, 'BACKGROUND', -1)[0] ||
+ null;
callback(bg);
}
});

Powered by Google App Engine
This is Rietveld 408576698