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

Side by Side Diff: Source/core/events/NodeEventContext.h

Issue 308073005: Oilpan: Replace RefPtrs to Node and its subclasses in core/events/ with Oilpan transition types. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/events/MutationEvent.cpp ('k') | Source/core/events/NodeEventContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All Rights Reserved. 2 * Copyright (C) 2014 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
32 #include "wtf/RefPtr.h" 32 #include "wtf/RefPtr.h"
33 33
34 namespace WebCore { 34 namespace WebCore {
35 35
36 class EventTarget; 36 class EventTarget;
37 class Node; 37 class Node;
38 class NodeList; 38 class NodeList;
39 class TouchEventContext; 39 class TouchEventContext;
40 40
41 class NodeEventContext { 41 class NodeEventContext {
42 ALLOW_ONLY_INLINE_ALLOCATION();
42 public: 43 public:
43 // FIXME: Use ContainerNode instead of Node. 44 // FIXME: Use ContainerNode instead of Node.
44 NodeEventContext(PassRefPtr<Node>, PassRefPtr<EventTarget> currentTarget); 45 NodeEventContext(PassRefPtrWillBeRawPtr<Node>, PassRefPtr<EventTarget> curre ntTarget);
45 ~NodeEventContext(); 46 ~NodeEventContext();
47 void trace(Visitor*);
46 48
47 Node* node() const { return m_node.get(); } 49 Node* node() const { return m_node.get(); }
48 50
49 void setTreeScopeEventContext(PassRefPtr<TreeScopeEventContext> prpTreeScope EventContext) { m_treeScopeEventContext = prpTreeScopeEventContext; } 51 void setTreeScopeEventContext(PassRefPtr<TreeScopeEventContext> prpTreeScope EventContext) { m_treeScopeEventContext = prpTreeScopeEventContext; }
50 TreeScopeEventContext& treeScopeEventContext() { ASSERT(m_treeScopeEventCont ext); return *m_treeScopeEventContext; } 52 TreeScopeEventContext& treeScopeEventContext() { ASSERT(m_treeScopeEventCont ext); return *m_treeScopeEventContext; }
51 53
52 EventTarget* target() const { return m_treeScopeEventContext->target(); } 54 EventTarget* target() const { return m_treeScopeEventContext->target(); }
53 EventTarget* relatedTarget() const { return m_treeScopeEventContext->related Target(); } 55 EventTarget* relatedTarget() const { return m_treeScopeEventContext->related Target(); }
54 TouchEventContext* touchEventContext() const { return m_treeScopeEventContex t->touchEventContext(); } 56 TouchEventContext* touchEventContext() const { return m_treeScopeEventContex t->touchEventContext(); }
55 57
56 bool currentTargetSameAsTarget() const { return m_currentTarget.get() == tar get(); } 58 bool currentTargetSameAsTarget() const { return m_currentTarget.get() == tar get(); }
57 void handleLocalEvents(Event*) const; 59 void handleLocalEvents(Event*) const;
58 60
59 private: 61 private:
60 RefPtr<Node> m_node; 62 RefPtrWillBeMember<Node> m_node;
61 RefPtr<EventTarget> m_currentTarget; 63 RefPtr<EventTarget> m_currentTarget;
62 RefPtr<TreeScopeEventContext> m_treeScopeEventContext; 64 RefPtr<TreeScopeEventContext> m_treeScopeEventContext;
63 }; 65 };
64 66
65 } 67 }
66 68
67 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(WebCore::NodeEventContext); 69 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(WebCore::NodeEventContext);
68 70
69 #endif // NodeEventContext_h 71 #endif // NodeEventContext_h
OLDNEW
« no previous file with comments | « Source/core/events/MutationEvent.cpp ('k') | Source/core/events/NodeEventContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698