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

Side by Side Diff: Source/bindings/core/v8/custom/V8EventTargetCustom.cpp

Issue 683013002: Extract a DOMWindow interface from LocalDOMWindow and use it in the idl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: whee Created 6 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 23 matching lines...) Expand all
34 #include "bindings/core/v8/V8Window.h" 34 #include "bindings/core/v8/V8Window.h"
35 #include "core/EventTargetNames.h" 35 #include "core/EventTargetNames.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 v8::Handle<v8::Value> toV8(EventTarget* impl, v8::Handle<v8::Object> creationCon text, v8::Isolate* isolate) 39 v8::Handle<v8::Value> toV8(EventTarget* impl, v8::Handle<v8::Object> creationCon text, v8::Isolate* isolate)
40 { 40 {
41 if (UNLIKELY(!impl)) 41 if (UNLIKELY(!impl))
42 return v8::Null(isolate); 42 return v8::Null(isolate);
43 43
44 // FIXME: This naming seems broken.
44 if (impl->interfaceName() == EventTargetNames::LocalDOMWindow) 45 if (impl->interfaceName() == EventTargetNames::LocalDOMWindow)
dcheng 2014/10/31 03:20:40 I'm not really sure what this is used for. It seem
haraken 2014/10/31 06:07:04 Yeah, let's fix this in a follow-up CL.
45 return toV8(static_cast<LocalDOMWindow*>(impl), creationContext, isolate ); 46 return toV8(static_cast<DOMWindow*>(impl), creationContext, isolate);
46 47
47 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapperNonTemplate(impl, is olate); 48 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapperNonTemplate(impl, is olate);
48 if (!wrapper.IsEmpty()) 49 if (!wrapper.IsEmpty())
49 return wrapper; 50 return wrapper;
50 return impl->wrap(creationContext, isolate); 51 return impl->wrap(creationContext, isolate);
51 } 52 }
52 53
53 } // namespace blink 54 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698