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

Unified Diff: extensions/renderer/event_bindings.cc

Issue 453613002: Implement support for <extensionoptions> embedding in WebUI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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/event_bindings.cc
diff --git a/extensions/renderer/event_bindings.cc b/extensions/renderer/event_bindings.cc
index 948d3dedd98b305b62474127d4bd8df86d0767cd..f2db7ee09a5818523e753aae1f25f83823caac2e 100644
--- a/extensions/renderer/event_bindings.cc
+++ b/extensions/renderer/event_bindings.cc
@@ -210,7 +210,8 @@ void EventBindings::AttachFilteredEvent(
return;
std::string extension_id = context()->GetExtensionID();
- if (extension_id.empty()) {
+ if (extension_id.empty() &&
+ context()->context_type() != Feature::Context::WEBUI_CONTEXT) {
not at google - send to devlin 2014/08/07 23:06:03 I'm surprised any of the filtered event logic work
ericzeng 2014/08/08 00:23:47 Done. Are you absolutely sure that the check isn't
not at google - send to devlin 2014/08/08 14:08:15 yes, it will get caught up on the browser.
args.GetReturnValue().Set(static_cast<int32_t>(-1));
return;
}
@@ -256,8 +257,11 @@ void EventBindings::DetachFilteredEvent(
bool is_manual = args[1]->BooleanValue();
std::string extension_id = context()->GetExtensionID();
- if (extension_id.empty())
+ if (extension_id.empty() &&
+ context()->context_type() != Feature::Context::WEBUI_CONTEXT) {
not at google - send to devlin 2014/08/07 23:06:03 likewise
ericzeng 2014/08/08 00:23:47 Done.
+ args.GetReturnValue().Set(static_cast<int32_t>(-1));
return;
+ }
int matcher_id = args[0]->Int32Value();
EventFilter& event_filter = g_event_filter.Get();

Powered by Google App Engine
This is Rietveld 408576698