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

Unified Diff: Source/bindings/v8/custom/V8WindowCustom.cpp

Issue 18112019: Have Window inherit EventTarget interface (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | « Source/bindings/tests/results/V8TestObject.cpp ('k') | Source/core/page/Window.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/custom/V8WindowCustom.cpp
diff --git a/Source/bindings/v8/custom/V8WindowCustom.cpp b/Source/bindings/v8/custom/V8WindowCustom.cpp
index 9afddacad8dd47b9fa8e239c1eefb553466bb739..e39bdf8dcf94ad97b0ef6aeed5efd73d5818ded5 100644
--- a/Source/bindings/v8/custom/V8WindowCustom.cpp
+++ b/Source/bindings/v8/custom/V8WindowCustom.cpp
@@ -232,60 +232,6 @@ void V8Window::openerAttrSetterCustom(v8::Local<v8::String> name, v8::Local<v8::
info.This()->Set(name, value);
}
-void V8Window::addEventListenerMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& args)
-{
- String eventType = toWebCoreString(args[0]);
- bool useCapture = args[2]->BooleanValue();
-
- DOMWindow* imp = V8Window::toNative(args.Holder());
-
- if (!BindingSecurity::shouldAllowAccessToFrame(imp->frame()))
- return;
-
- Document* doc = imp->document();
-
- if (!doc)
- return;
-
- // FIXME: Check if there is not enough arguments
- if (!imp->frame())
haraken 2013/07/10 13:07:57 Looks like this check was not needed. We never hit
do-not-use 2013/07/10 13:16:52 Correct, BindingSecurity::shouldAllowAccessToFrame
- return;
-
- RefPtr<EventListener> listener = V8EventListenerList::getEventListener(args[1], false, ListenerFindOrCreate);
-
- if (listener) {
- imp->addEventListener(eventType, listener, useCapture);
- createHiddenDependency(args.Holder(), args[1], eventListenerCacheIndex, args.GetIsolate());
- }
-}
-
-
-void V8Window::removeEventListenerMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& args)
-{
- String eventType = toWebCoreString(args[0]);
- bool useCapture = args[2]->BooleanValue();
-
- DOMWindow* imp = V8Window::toNative(args.Holder());
-
- if (!BindingSecurity::shouldAllowAccessToFrame(imp->frame()))
- return;
-
- Document* doc = imp->document();
-
- if (!doc)
- return;
-
- if (!imp->frame())
haraken 2013/07/10 13:07:57 Ditto.
- return;
-
- RefPtr<EventListener> listener = V8EventListenerList::getEventListener(args[1], false, ListenerFindOnly);
-
- if (listener) {
- imp->removeEventListener(eventType, listener.get(), useCapture);
- removeHiddenDependency(args.Holder(), args[1], eventListenerCacheIndex, args.GetIsolate());
- }
-}
-
static bool isLegacyTargetOriginDesignation(v8::Handle<v8::Value> value)
{
if (value->IsString() || value->IsStringObject())
« no previous file with comments | « Source/bindings/tests/results/V8TestObject.cpp ('k') | Source/core/page/Window.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698