Commit 248fe6c8 authored by eroman@chromium.org's avatar eroman@chromium.org

Use "unsigned" rather than "unsigned long" for C++ code interacting with WebIDL's "unsigned long".

(WebIDL's "unsigned long" is a 32-bit type)

BUG=267360

Review URL: https://codereview.chromium.org/717413002

git-svn-id: svn://svn.chromium.org/blink/trunk@185315 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 8364b435
...@@ -36,7 +36,7 @@ SpeechGrammarList* SpeechGrammarList::create() ...@@ -36,7 +36,7 @@ SpeechGrammarList* SpeechGrammarList::create()
return new SpeechGrammarList; return new SpeechGrammarList;
} }
SpeechGrammar* SpeechGrammarList::item(unsigned long index) const SpeechGrammar* SpeechGrammarList::item(unsigned index) const
{ {
if (index >= m_grammars.size()) if (index >= m_grammars.size())
return 0; return 0;
......
...@@ -39,8 +39,8 @@ class SpeechGrammarList final : public GarbageCollected<SpeechGrammarList>, publ ...@@ -39,8 +39,8 @@ class SpeechGrammarList final : public GarbageCollected<SpeechGrammarList>, publ
public: public:
static SpeechGrammarList* create(); static SpeechGrammarList* create();
unsigned long length() const { return m_grammars.size(); } unsigned length() const { return m_grammars.size(); }
SpeechGrammar* item(unsigned long) const; SpeechGrammar* item(unsigned) const;
void addFromUri(ExecutionContext*, const String& src, double weight = 1.0); void addFromUri(ExecutionContext*, const String& src, double weight = 1.0);
void addFromString(const String&, double weight = 1.0); void addFromString(const String&, double weight = 1.0);
......
...@@ -108,7 +108,7 @@ void SpeechRecognition::didEndAudio() ...@@ -108,7 +108,7 @@ void SpeechRecognition::didEndAudio()
void SpeechRecognition::didReceiveResults(const HeapVector<Member<SpeechRecognitionResult> >& newFinalResults, const HeapVector<Member<SpeechRecognitionResult> >& currentInterimResults) void SpeechRecognition::didReceiveResults(const HeapVector<Member<SpeechRecognitionResult> >& newFinalResults, const HeapVector<Member<SpeechRecognitionResult> >& currentInterimResults)
{ {
unsigned long resultIndex = m_finalResults.size(); size_t resultIndex = m_finalResults.size();
for (size_t i = 0; i < newFinalResults.size(); ++i) for (size_t i = 0; i < newFinalResults.size(); ++i)
m_finalResults.append(newFinalResults[i]); m_finalResults.append(newFinalResults[i]);
......
...@@ -60,8 +60,8 @@ public: ...@@ -60,8 +60,8 @@ public:
void setContinuous(bool continuous) { m_continuous = continuous; } void setContinuous(bool continuous) { m_continuous = continuous; }
bool interimResults() { return m_interimResults; } bool interimResults() { return m_interimResults; }
void setInterimResults(bool interimResults) { m_interimResults = interimResults; } void setInterimResults(bool interimResults) { m_interimResults = interimResults; }
unsigned long maxAlternatives() { return m_maxAlternatives; } unsigned maxAlternatives() { return m_maxAlternatives; }
void setMaxAlternatives(unsigned long maxAlternatives) { m_maxAlternatives = maxAlternatives; } void setMaxAlternatives(unsigned maxAlternatives) { m_maxAlternatives = maxAlternatives; }
MediaStreamTrack* audioTrack() { return m_audioTrack; } MediaStreamTrack* audioTrack() { return m_audioTrack; }
void setAudioTrack(MediaStreamTrack* audioTrack) { m_audioTrack = audioTrack; } void setAudioTrack(MediaStreamTrack* audioTrack) { m_audioTrack = audioTrack; }
......
...@@ -34,7 +34,7 @@ SpeechRecognitionResult* SpeechRecognitionResult::create(const HeapVector<Member ...@@ -34,7 +34,7 @@ SpeechRecognitionResult* SpeechRecognitionResult::create(const HeapVector<Member
return new SpeechRecognitionResult(alternatives, final); return new SpeechRecognitionResult(alternatives, final);
} }
SpeechRecognitionAlternative* SpeechRecognitionResult::item(unsigned long index) SpeechRecognitionAlternative* SpeechRecognitionResult::item(unsigned index)
{ {
if (index >= m_alternatives.size()) if (index >= m_alternatives.size())
return 0; return 0;
......
...@@ -37,8 +37,8 @@ class SpeechRecognitionResult final : public GarbageCollected<SpeechRecognitionR ...@@ -37,8 +37,8 @@ class SpeechRecognitionResult final : public GarbageCollected<SpeechRecognitionR
public: public:
static SpeechRecognitionResult* create(const HeapVector<Member<SpeechRecognitionAlternative> >&, bool final); static SpeechRecognitionResult* create(const HeapVector<Member<SpeechRecognitionAlternative> >&, bool final);
unsigned long length() { return m_alternatives.size(); } unsigned length() { return m_alternatives.size(); }
SpeechRecognitionAlternative* item(unsigned long index); SpeechRecognitionAlternative* item(unsigned index);
bool isFinal() { return m_final; } bool isFinal() { return m_final; }
void trace(Visitor*); void trace(Visitor*);
......
...@@ -34,7 +34,7 @@ SpeechRecognitionResultList* SpeechRecognitionResultList::create(const HeapVecto ...@@ -34,7 +34,7 @@ SpeechRecognitionResultList* SpeechRecognitionResultList::create(const HeapVecto
return new SpeechRecognitionResultList(results); return new SpeechRecognitionResultList(results);
} }
SpeechRecognitionResult* SpeechRecognitionResultList::item(unsigned long index) SpeechRecognitionResult* SpeechRecognitionResultList::item(unsigned index)
{ {
if (index >= m_results.size()) if (index >= m_results.size())
return 0; return 0;
......
...@@ -37,8 +37,8 @@ class SpeechRecognitionResultList : public GarbageCollected<SpeechRecognitionRes ...@@ -37,8 +37,8 @@ class SpeechRecognitionResultList : public GarbageCollected<SpeechRecognitionRes
public: public:
static SpeechRecognitionResultList* create(const HeapVector<Member<SpeechRecognitionResult> >&); static SpeechRecognitionResultList* create(const HeapVector<Member<SpeechRecognitionResult> >&);
unsigned long length() { return m_results.size(); } unsigned length() { return m_results.size(); }
SpeechRecognitionResult* item(unsigned long index); SpeechRecognitionResult* item(unsigned index);
void trace(Visitor*); void trace(Visitor*);
......
...@@ -33,7 +33,7 @@ PassRefPtrWillBeRawPtr<SpeechSynthesisEvent> SpeechSynthesisEvent::create() ...@@ -33,7 +33,7 @@ PassRefPtrWillBeRawPtr<SpeechSynthesisEvent> SpeechSynthesisEvent::create()
return adoptRefWillBeNoop(new SpeechSynthesisEvent); return adoptRefWillBeNoop(new SpeechSynthesisEvent);
} }
PassRefPtrWillBeRawPtr<SpeechSynthesisEvent> SpeechSynthesisEvent::create(const AtomicString& type, unsigned long charIndex, float elapsedTime, const String& name) PassRefPtrWillBeRawPtr<SpeechSynthesisEvent> SpeechSynthesisEvent::create(const AtomicString& type, unsigned charIndex, float elapsedTime, const String& name)
{ {
return adoptRefWillBeNoop(new SpeechSynthesisEvent(type, charIndex, elapsedTime, name)); return adoptRefWillBeNoop(new SpeechSynthesisEvent(type, charIndex, elapsedTime, name));
} }
...@@ -42,7 +42,7 @@ SpeechSynthesisEvent::SpeechSynthesisEvent() ...@@ -42,7 +42,7 @@ SpeechSynthesisEvent::SpeechSynthesisEvent()
{ {
} }
SpeechSynthesisEvent::SpeechSynthesisEvent(const AtomicString& type, unsigned long charIndex, float elapsedTime, const String& name) SpeechSynthesisEvent::SpeechSynthesisEvent(const AtomicString& type, unsigned charIndex, float elapsedTime, const String& name)
: Event(type, false, false) : Event(type, false, false)
, m_charIndex(charIndex) , m_charIndex(charIndex)
, m_elapsedTime(elapsedTime) , m_elapsedTime(elapsedTime)
......
...@@ -34,9 +34,9 @@ class SpeechSynthesisEvent final : public Event { ...@@ -34,9 +34,9 @@ class SpeechSynthesisEvent final : public Event {
DEFINE_WRAPPERTYPEINFO(); DEFINE_WRAPPERTYPEINFO();
public: public:
static PassRefPtrWillBeRawPtr<SpeechSynthesisEvent> create(); static PassRefPtrWillBeRawPtr<SpeechSynthesisEvent> create();
static PassRefPtrWillBeRawPtr<SpeechSynthesisEvent> create(const AtomicString& type, unsigned long charIndex, float elapsedTime, const String& name); static PassRefPtrWillBeRawPtr<SpeechSynthesisEvent> create(const AtomicString& type, unsigned charIndex, float elapsedTime, const String& name);
unsigned long charIndex() const { return m_charIndex; } unsigned charIndex() const { return m_charIndex; }
float elapsedTime() const { return m_elapsedTime; } float elapsedTime() const { return m_elapsedTime; }
const String& name() const { return m_name; } const String& name() const { return m_name; }
...@@ -49,9 +49,9 @@ public: ...@@ -49,9 +49,9 @@ public:
private: private:
SpeechSynthesisEvent(); SpeechSynthesisEvent();
SpeechSynthesisEvent(const AtomicString& type, unsigned long charIndex, float elapsedTime, const String& name); SpeechSynthesisEvent(const AtomicString& type, unsigned charIndex, float elapsedTime, const String& name);
unsigned long m_charIndex; unsigned m_charIndex;
float m_elapsedTime; float m_elapsedTime;
String m_name; String m_name;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment