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

Side by Side Diff: third_party/WebKit/Source/core/events/EventListener.h

Issue 2492793002: Support fetching attribute listeners from outside v8 context scopes. (Closed)
Patch Set: try to tidy up logic Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 27 matching lines...) Expand all
38 ImageEventListenerType, 38 ImageEventListenerType,
39 CPPEventListenerType, 39 CPPEventListenerType,
40 ConditionEventListenerType, 40 ConditionEventListenerType,
41 NativeEventListenerType, 41 NativeEventListenerType,
42 }; 42 };
43 43
44 virtual ~EventListener() {} 44 virtual ~EventListener() {}
45 virtual bool operator==(const EventListener&) const = 0; 45 virtual bool operator==(const EventListener&) const = 0;
46 virtual void handleEvent(ExecutionContext*, Event*) = 0; 46 virtual void handleEvent(ExecutionContext*, Event*) = 0;
47 virtual const String& code() const { return emptyString(); } 47 virtual const String& code() const { return emptyString(); }
48 virtual bool belongsToTheCurrentWorld() const { return false; } 48 virtual bool belongsToTheCurrentWorld(ExecutionContext*) const {
49 return false;
50 }
49 51
50 bool isAttribute() const { return virtualisAttribute(); } 52 bool isAttribute() const { return virtualisAttribute(); }
51 ListenerType type() const { return m_type; } 53 ListenerType type() const { return m_type; }
52 54
53 DEFINE_INLINE_VIRTUAL_TRACE() {} 55 DEFINE_INLINE_VIRTUAL_TRACE() {}
54 56
55 protected: 57 protected:
56 explicit EventListener(ListenerType type) : m_type(type) {} 58 explicit EventListener(ListenerType type) : m_type(type) {}
57 59
58 private: 60 private:
59 virtual bool virtualisAttribute() const { return false; } 61 virtual bool virtualisAttribute() const { return false; }
60 62
61 ListenerType m_type; 63 ListenerType m_type;
62 }; 64 };
63 65
64 } // namespace blink 66 } // namespace blink
65 67
66 #endif 68 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698