Chromium Code Reviews| Index: chrome/renderer/extensions/event_bindings.cc |
| diff --git a/chrome/renderer/extensions/event_bindings.cc b/chrome/renderer/extensions/event_bindings.cc |
| index 4d09951c744e2c45e62576a755c711bab6c7561b..c3611feede06633467da49d0095f9e4891d0d90e 100644 |
| --- a/chrome/renderer/extensions/event_bindings.cc |
| +++ b/chrome/renderer/extensions/event_bindings.cc |
| @@ -70,9 +70,8 @@ base::LazyInstance<EventFilter> g_event_filter = LAZY_INSTANCE_INITIALIZER; |
| // TODO(koz): Merge this into EventBindings. |
| class ExtensionImpl : public ChromeV8Extension { |
| public: |
| - explicit ExtensionImpl(Dispatcher* dispatcher, |
| - v8::Handle<v8::Context> v8_context) |
| - : ChromeV8Extension(dispatcher, v8_context) { |
| + explicit ExtensionImpl(Dispatcher* dispatcher, ChromeV8Context* context) |
| + : ChromeV8Extension(dispatcher, context) { |
| RouteFunction("AttachEvent", |
| base::Bind(&ExtensionImpl::AttachEvent, base::Unretained(this))); |
| RouteFunction("DetachEvent", |
| @@ -98,8 +97,7 @@ class ExtensionImpl : public ChromeV8Extension { |
| if (args[0]->IsString()) { |
| std::string event_name = *v8::String::AsciiValue(args[0]->ToString()); |
| - const ChromeV8ContextSet& context_set = dispatcher_->v8_context_set(); |
| - ChromeV8Context* context = context_set.GetByV8Context(v8_context()); |
| + ChromeV8Context* context = GetContext(); |
|
not at google - send to devlin
2013/05/29 17:41:55
ditto etc
marja
2013/05/31 10:06:44
Done.
|
| CHECK(context); |
| if (!dispatcher_->CheckContextAccessToExtensionAPI(event_name, context)) |
| @@ -133,8 +131,7 @@ class ExtensionImpl : public ChromeV8Extension { |
| std::string event_name = *v8::String::AsciiValue(args[0]->ToString()); |
| bool is_manual = args[1]->BooleanValue(); |
| - const ChromeV8ContextSet& context_set = dispatcher_->v8_context_set(); |
| - ChromeV8Context* context = context_set.GetByV8Context(v8_context()); |
| + ChromeV8Context* context = GetContext(); |
| if (!context) |
| return v8::Undefined(); |
| @@ -170,8 +167,7 @@ class ExtensionImpl : public ChromeV8Extension { |
| DCHECK(args[0]->IsString()); |
| DCHECK(args[1]->IsObject()); |
| - const ChromeV8ContextSet& context_set = dispatcher_->v8_context_set(); |
| - ChromeV8Context* context = context_set.GetByV8Context(v8_context()); |
| + ChromeV8Context* context = GetContext(); |
| DCHECK(context); |
| if (!context) |
| return v8::Integer::New(-1); |
| @@ -252,8 +248,7 @@ class ExtensionImpl : public ChromeV8Extension { |
| DCHECK(args[0]->IsInt32()); |
| DCHECK(args[1]->IsBoolean()); |
| bool is_manual = args[1]->BooleanValue(); |
| - const ChromeV8ContextSet& context_set = dispatcher_->v8_context_set(); |
| - ChromeV8Context* context = context_set.GetByV8Context(v8_context()); |
| + ChromeV8Context* context = GetContext(); |
| if (!context) |
| return v8::Undefined(); |
| @@ -331,7 +326,7 @@ class ExtensionImpl : public ChromeV8Extension { |
| // static |
| ChromeV8Extension* EventBindings::Create(Dispatcher* dispatcher, |
| - v8::Handle<v8::Context> context) { |
| + ChromeV8Context* context) { |
| return new ExtensionImpl(dispatcher, context); |
| } |