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

Side by Side Diff: third_party/WebKit/Source/modules/presentation/PresentationAvailability.h

Issue 1942723004: Change EventTarget callback APIs for add/RemoveEventListenerInternal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win32 signed/unsigned issue Created 4 years, 7 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 PresentationAvailability_h 5 #ifndef PresentationAvailability_h
6 #define PresentationAvailability_h 6 #define PresentationAvailability_h
7 7
8 #include "bindings/core/v8/ActiveScriptWrappable.h" 8 #include "bindings/core/v8/ActiveScriptWrappable.h"
9 #include "core/dom/ActiveDOMObject.h" 9 #include "core/dom/ActiveDOMObject.h"
10 #include "core/events/EventTarget.h" 10 #include "core/events/EventTarget.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 void pageVisibilityChanged() override; 55 void pageVisibilityChanged() override;
56 56
57 bool value() const; 57 bool value() const;
58 58
59 DEFINE_ATTRIBUTE_EVENT_LISTENER(change); 59 DEFINE_ATTRIBUTE_EVENT_LISTENER(change);
60 60
61 DECLARE_VIRTUAL_TRACE(); 61 DECLARE_VIRTUAL_TRACE();
62 62
63 protected: 63 protected:
64 // EventTarget implementation. 64 // EventTarget implementation.
65 bool addEventListenerInternal(const AtomicString& eventType, EventListener*, const EventListenerOptions&) override; 65 void addedEventListener(const AtomicString& eventType, RegisteredEventListen er&) override;
66 66
67 private: 67 private:
68 // Current state of the ActiveDOMObject. It is Active when created. It 68 // Current state of the ActiveDOMObject. It is Active when created. It
69 // becomes Suspended when suspend() is called and moves back to Active if 69 // becomes Suspended when suspend() is called and moves back to Active if
70 // resume() is called. It becomes Inactive when stop() is called or at 70 // resume() is called. It becomes Inactive when stop() is called or at
71 // destruction time. 71 // destruction time.
72 enum class State : char { 72 enum class State : char {
73 Active, 73 Active,
74 Suspended, 74 Suspended,
75 Inactive, 75 Inactive,
76 }; 76 };
77 77
78 PresentationAvailability(ExecutionContext*, const KURL&, bool); 78 PresentationAvailability(ExecutionContext*, const KURL&, bool);
79 79
80 void setState(State); 80 void setState(State);
81 void updateListening(); 81 void updateListening();
82 82
83 const KURL m_url; 83 const KURL m_url;
84 bool m_value; 84 bool m_value;
85 State m_state; 85 State m_state;
86 }; 86 };
87 87
88 } // namespace blink 88 } // namespace blink
89 89
90 #endif // PresentationAvailability_h 90 #endif // PresentationAvailability_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698