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

Side by Side Diff: Source/modules/netinfo/NetworkInformation.h

Issue 1238083002: Oilpan: Move the EventListener hierarchy to Oilpan's heap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NetworkInformation_h 5 #ifndef NetworkInformation_h
6 #define NetworkInformation_h 6 #define NetworkInformation_h
7 7
8 #include "core/dom/ActiveDOMObject.h" 8 #include "core/dom/ActiveDOMObject.h"
9 #include "core/events/EventTarget.h" 9 #include "core/events/EventTarget.h"
10 #include "core/page/NetworkStateNotifier.h" 10 #include "core/page/NetworkStateNotifier.h"
(...skipping 14 matching lines...) Expand all
25 static NetworkInformation* create(ExecutionContext*); 25 static NetworkInformation* create(ExecutionContext*);
26 ~NetworkInformation() override; 26 ~NetworkInformation() override;
27 27
28 String type() const; 28 String type() const;
29 29
30 void connectionTypeChange(WebConnectionType) override; 30 void connectionTypeChange(WebConnectionType) override;
31 31
32 // EventTarget overrides. 32 // EventTarget overrides.
33 const AtomicString& interfaceName() const override; 33 const AtomicString& interfaceName() const override;
34 ExecutionContext* executionContext() const override; 34 ExecutionContext* executionContext() const override;
35 bool addEventListener(const AtomicString& eventType, PassRefPtr<EventListene r>, bool useCapture = false) override; 35 bool addEventListener(const AtomicString& eventType, PassRefPtrWillBeRawPtr< EventListener>, bool useCapture = false) override;
36 bool removeEventListener(const AtomicString& eventType, PassRefPtr<EventList ener>, bool useCapture = false) override; 36 bool removeEventListener(const AtomicString& eventType, PassRefPtrWillBeRawP tr<EventListener>, bool useCapture = false) override;
37 void removeAllEventListeners() override; 37 void removeAllEventListeners() override;
38 38
39 // ActiveDOMObject overrides. 39 // ActiveDOMObject overrides.
40 bool hasPendingActivity() const override; 40 bool hasPendingActivity() const override;
41 void stop() override; 41 void stop() override;
42 42
43 DECLARE_VIRTUAL_TRACE(); 43 DECLARE_VIRTUAL_TRACE();
44 44
45 DEFINE_ATTRIBUTE_EVENT_LISTENER(typechange); 45 DEFINE_ATTRIBUTE_EVENT_LISTENER(typechange);
46 46
47 private: 47 private:
48 explicit NetworkInformation(ExecutionContext*); 48 explicit NetworkInformation(ExecutionContext*);
49 void startObserving(); 49 void startObserving();
50 void stopObserving(); 50 void stopObserving();
51 51
52 // Touched only on context thread. 52 // Touched only on context thread.
53 WebConnectionType m_type; 53 WebConnectionType m_type;
54 54
55 // Whether this object is listening for events from NetworkStateNotifier. 55 // Whether this object is listening for events from NetworkStateNotifier.
56 bool m_observing; 56 bool m_observing;
57 57
58 // Whether ActiveDOMObject::stop has been called. 58 // Whether ActiveDOMObject::stop has been called.
59 bool m_contextStopped; 59 bool m_contextStopped;
60 }; 60 };
61 61
62 } // namespace blink 62 } // namespace blink
63 63
64 #endif // NetworkInformation_h 64 #endif // NetworkInformation_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698