OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2010 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 21 matching lines...) Expand all Loading... |
32 #include "wtf/RefPtr.h" | 32 #include "wtf/RefPtr.h" |
33 | 33 |
34 namespace blink { | 34 namespace blink { |
35 | 35 |
36 class EventTarget; | 36 class EventTarget; |
37 class Event; | 37 class Event; |
38 class Node; | 38 class Node; |
39 class NodeEventContext; | 39 class NodeEventContext; |
40 | 40 |
41 class WindowEventContext : public NoBaseWillBeGarbageCollected<WindowEventContex
t> { | 41 class WindowEventContext : public NoBaseWillBeGarbageCollected<WindowEventContex
t> { |
| 42 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(WindowEventContext); |
| 43 WTF_MAKE_NONCOPYABLE(WindowEventContext); |
42 public: | 44 public: |
43 WindowEventContext(Event&, const NodeEventContext& topNodeEventContext); | 45 WindowEventContext(Event&, const NodeEventContext& topNodeEventContext); |
44 | 46 |
45 LocalDOMWindow* window() const; | 47 LocalDOMWindow* window() const; |
46 EventTarget* target() const; | 48 EventTarget* target() const; |
47 bool handleLocalEvents(Event&); | 49 bool handleLocalEvents(Event&); |
48 | 50 |
49 DECLARE_TRACE(); | 51 DECLARE_TRACE(); |
50 | 52 |
51 private: | 53 private: |
52 RefPtrWillBeMember<LocalDOMWindow> m_window; | 54 RefPtrWillBeMember<LocalDOMWindow> m_window; |
53 RefPtrWillBeMember<EventTarget> m_target; | 55 RefPtrWillBeMember<EventTarget> m_target; |
54 }; | 56 }; |
55 | 57 |
56 inline LocalDOMWindow* WindowEventContext::window() const | 58 inline LocalDOMWindow* WindowEventContext::window() const |
57 { | 59 { |
58 return m_window.get(); | 60 return m_window.get(); |
59 } | 61 } |
60 | 62 |
61 inline EventTarget* WindowEventContext::target() const | 63 inline EventTarget* WindowEventContext::target() const |
62 { | 64 { |
63 return m_target.get(); | 65 return m_target.get(); |
64 } | 66 } |
65 | 67 |
66 } | 68 } |
67 | 69 |
68 #endif // WindowEventContext_h | 70 #endif // WindowEventContext_h |
OLD | NEW |