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

Side by Side Diff: Source/modules/mediastream/RTCDTMFSender.h

Issue 716323002: Use "int" rather than "long" for C++ code interacting with WebIDL's "long". (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollectedWi llBeGarbageCollectedFinalized<RTCDTMFSender>); 46 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollectedWi llBeGarbageCollectedFinalized<RTCDTMFSender>);
47 DEFINE_WRAPPERTYPEINFO(); 47 DEFINE_WRAPPERTYPEINFO();
48 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RTCDTMFSender); 48 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RTCDTMFSender);
49 public: 49 public:
50 static RTCDTMFSender* create(ExecutionContext*, WebRTCPeerConnectionHandler* , MediaStreamTrack*, ExceptionState&); 50 static RTCDTMFSender* create(ExecutionContext*, WebRTCPeerConnectionHandler* , MediaStreamTrack*, ExceptionState&);
51 virtual ~RTCDTMFSender(); 51 virtual ~RTCDTMFSender();
52 52
53 bool canInsertDTMF() const; 53 bool canInsertDTMF() const;
54 MediaStreamTrack* track() const; 54 MediaStreamTrack* track() const;
55 String toneBuffer() const; 55 String toneBuffer() const;
56 long duration() const { return m_duration; } 56 int duration() const { return m_duration; }
57 long interToneGap() const { return m_interToneGap; } 57 int interToneGap() const { return m_interToneGap; }
58 58
59 void insertDTMF(const String& tones, ExceptionState&); 59 void insertDTMF(const String& tones, ExceptionState&);
60 void insertDTMF(const String& tones, long duration, ExceptionState&); 60 void insertDTMF(const String& tones, int duration, ExceptionState&);
61 void insertDTMF(const String& tones, long duration, long interToneGap, Excep tionState&); 61 void insertDTMF(const String& tones, int duration, int interToneGap, Excepti onState&);
62 62
63 DEFINE_ATTRIBUTE_EVENT_LISTENER(tonechange); 63 DEFINE_ATTRIBUTE_EVENT_LISTENER(tonechange);
64 64
65 // EventTarget 65 // EventTarget
66 virtual const AtomicString& interfaceName() const override; 66 virtual const AtomicString& interfaceName() const override;
67 virtual ExecutionContext* executionContext() const override; 67 virtual ExecutionContext* executionContext() const override;
68 68
69 // ActiveDOMObject 69 // ActiveDOMObject
70 virtual void stop() override; 70 virtual void stop() override;
71 71
72 virtual void trace(Visitor*) override; 72 virtual void trace(Visitor*) override;
73 73
74 private: 74 private:
75 RTCDTMFSender(ExecutionContext*, MediaStreamTrack*, PassOwnPtr<WebRTCDTMFSen derHandler>); 75 RTCDTMFSender(ExecutionContext*, MediaStreamTrack*, PassOwnPtr<WebRTCDTMFSen derHandler>);
76 76
77 void scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event>); 77 void scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event>);
78 void scheduledEventTimerFired(Timer<RTCDTMFSender>*); 78 void scheduledEventTimerFired(Timer<RTCDTMFSender>*);
79 79
80 // WebRTCDTMFSenderHandlerClient 80 // WebRTCDTMFSenderHandlerClient
81 virtual void didPlayTone(const WebString&) override; 81 virtual void didPlayTone(const WebString&) override;
82 82
83 Member<MediaStreamTrack> m_track; 83 Member<MediaStreamTrack> m_track;
84 long m_duration; 84 int m_duration;
85 long m_interToneGap; 85 int m_interToneGap;
86 86
87 OwnPtr<WebRTCDTMFSenderHandler> m_handler; 87 OwnPtr<WebRTCDTMFSenderHandler> m_handler;
88 88
89 bool m_stopped; 89 bool m_stopped;
90 90
91 Timer<RTCDTMFSender> m_scheduledEventTimer; 91 Timer<RTCDTMFSender> m_scheduledEventTimer;
92 WillBeHeapVector<RefPtrWillBeMember<Event> > m_scheduledEvents; 92 WillBeHeapVector<RefPtrWillBeMember<Event> > m_scheduledEvents;
93 }; 93 };
94 94
95 } // namespace blink 95 } // namespace blink
96 96
97 #endif // RTCDTMFSender_h 97 #endif // RTCDTMFSender_h
OLDNEW
« no previous file with comments | « no previous file | Source/modules/mediastream/RTCDTMFSender.cpp » ('j') | Source/modules/mediastream/RTCDataChannel.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698