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

Unified Diff: extensions/renderer/runtime_custom_bindings.cc

Issue 2105033003: tabId support to chrome.extensions.getViews() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor followup to patch 5 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
« no previous file with comments | « extensions/renderer/resources/runtime_custom_bindings.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/runtime_custom_bindings.cc
diff --git a/extensions/renderer/runtime_custom_bindings.cc b/extensions/renderer/runtime_custom_bindings.cc
index 6efae5f182d9f925e92b55ad91cb6328439206e5..0d0d0df3f4a398cb4416cf2cb53d2592e0eb12d6 100644
--- a/extensions/renderer/runtime_custom_bindings.cc
+++ b/extensions/renderer/runtime_custom_bindings.cc
@@ -107,16 +107,18 @@ void RuntimeCustomBindings::GetManifest(
void RuntimeCustomBindings::GetExtensionViews(
const v8::FunctionCallbackInfo<v8::Value>& args) {
- CHECK_EQ(args.Length(), 2);
+ CHECK_EQ(args.Length(), 3);
CHECK(args[0]->IsInt32());
- CHECK(args[1]->IsString());
+ CHECK(args[1]->IsInt32());
+ CHECK(args[2]->IsString());
// |browser_window_id| == extension_misc::kUnknownWindowId means getting
// all views for the current extension.
int browser_window_id = args[0]->Int32Value();
+ int tab_id = args[1]->Int32Value();
std::string view_type_string =
- base::ToUpperASCII(*v8::String::Utf8Value(args[1]));
+ base::ToUpperASCII(*v8::String::Utf8Value(args[2]));
// |view_type| == VIEW_TYPE_INVALID means getting any type of
// views.
ViewType view_type = VIEW_TYPE_INVALID;
@@ -144,7 +146,7 @@ void RuntimeCustomBindings::GetExtensionViews(
std::vector<content::RenderFrame*> frames =
ExtensionFrameHelper::GetExtensionFrames(extension_id, browser_window_id,
- view_type);
+ tab_id, view_type);
v8::Local<v8::Context> v8_context = args.GetIsolate()->GetCurrentContext();
v8::Local<v8::Array> v8_views = v8::Array::New(args.GetIsolate());
int v8_index = 0;
« no previous file with comments | « extensions/renderer/resources/runtime_custom_bindings.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698