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

Side by Side Diff: third_party/WebKit/Source/modules/mediastream/MediaDevices.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 MediaDevices_h 5 #ifndef MediaDevices_h
6 #define MediaDevices_h 6 #define MediaDevices_h
7 7
8 #include "bindings/core/v8/ActiveScriptWrappable.h" 8 #include "bindings/core/v8/ActiveScriptWrappable.h"
9 #include "bindings/core/v8/ScriptPromise.h" 9 #include "bindings/core/v8/ScriptPromise.h"
10 #include "core/dom/ActiveDOMObject.h" 10 #include "core/dom/ActiveDOMObject.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 void stop() override; 45 void stop() override;
46 void suspend() override; 46 void suspend() override;
47 void resume() override; 47 void resume() override;
48 48
49 DECLARE_VIRTUAL_TRACE(); 49 DECLARE_VIRTUAL_TRACE();
50 50
51 DEFINE_ATTRIBUTE_EVENT_LISTENER(devicechange); 51 DEFINE_ATTRIBUTE_EVENT_LISTENER(devicechange);
52 52
53 protected: 53 protected:
54 // EventTarget overrides. 54 // EventTarget overrides.
55 bool addEventListenerInternal(const AtomicString& eventType, EventListener*, const EventListenerOptions&) override; 55 void addedEventListener(const AtomicString& eventType, RegisteredEventListen er&) override;
56 bool removeEventListenerInternal(const AtomicString& eventType, EventListene r*, const EventListenerOptions&) override; 56 void removedEventListener(const AtomicString& eventType, const RegisteredEve ntListener&) override;
57 57
58 private: 58 private:
59 explicit MediaDevices(ExecutionContext*); 59 explicit MediaDevices(ExecutionContext*);
60 void scheduleDispatchEvent(Event*); 60 void scheduleDispatchEvent(Event*);
61 void dispatchScheduledEvent(); 61 void dispatchScheduledEvent();
62 void startObserving(); 62 void startObserving();
63 void stopObserving(); 63 void stopObserving();
64 UserMediaController* getUserMediaController(); 64 UserMediaController* getUserMediaController();
65 void dispose(); 65 void dispose();
66 66
67 bool m_observing; 67 bool m_observing;
68 bool m_stopped; 68 bool m_stopped;
69 Member<AsyncMethodRunner<MediaDevices>> m_dispatchScheduledEventRunner; 69 Member<AsyncMethodRunner<MediaDevices>> m_dispatchScheduledEventRunner;
70 HeapVector<Member<Event>> m_scheduledEvents; 70 HeapVector<Member<Event>> m_scheduledEvents;
71 }; 71 };
72 72
73 } // namespace blink 73 } // namespace blink
74 74
75 #endif 75 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698