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: Source/modules/speech/SpeechRecognition.h

Issue 1034833002: Adding a serviceURI param to SpeechRecognition (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changing the serviceuri param to be KURL rather than string so we can check whether the url is vali… Created 5 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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 * * Redistributions of source code must retain the above copyright 7 * * 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 * * Redistributions in binary form must reproduce the above copyright 9 * * 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 public: 51 public:
52 static SpeechRecognition* create(ExecutionContext*); 52 static SpeechRecognition* create(ExecutionContext*);
53 virtual ~SpeechRecognition(); 53 virtual ~SpeechRecognition();
54 54
55 // SpeechRecognition.idl implemementation. 55 // SpeechRecognition.idl implemementation.
56 // Attributes. 56 // Attributes.
57 SpeechGrammarList* grammars() { return m_grammars; } 57 SpeechGrammarList* grammars() { return m_grammars; }
58 void setGrammars(SpeechGrammarList* grammars) { m_grammars = grammars; } 58 void setGrammars(SpeechGrammarList* grammars) { m_grammars = grammars; }
59 String lang() { return m_lang; } 59 String lang() { return m_lang; }
60 void setLang(const String& lang) { m_lang = lang; } 60 void setLang(const String& lang) { m_lang = lang; }
61 String serviceURI() { return m_serviceURI; }
62 void setServiceURI(const String& serviceURI) { m_serviceURI = serviceURI; }
61 bool continuous() { return m_continuous; } 63 bool continuous() { return m_continuous; }
62 void setContinuous(bool continuous) { m_continuous = continuous; } 64 void setContinuous(bool continuous) { m_continuous = continuous; }
63 bool interimResults() { return m_interimResults; } 65 bool interimResults() { return m_interimResults; }
64 void setInterimResults(bool interimResults) { m_interimResults = interimResu lts; } 66 void setInterimResults(bool interimResults) { m_interimResults = interimResu lts; }
65 unsigned maxAlternatives() { return m_maxAlternatives; } 67 unsigned maxAlternatives() { return m_maxAlternatives; }
66 void setMaxAlternatives(unsigned maxAlternatives) { m_maxAlternatives = maxA lternatives; } 68 void setMaxAlternatives(unsigned maxAlternatives) { m_maxAlternatives = maxA lternatives; }
67 MediaStreamTrack* audioTrack() { return m_audioTrack; } 69 MediaStreamTrack* audioTrack() { return m_audioTrack; }
68 void setAudioTrack(MediaStreamTrack* audioTrack) { m_audioTrack = audioTrack ; } 70 void setAudioTrack(MediaStreamTrack* audioTrack) { m_audioTrack = audioTrack ; }
69 71
70 // Callable by the user. 72 // Callable by the user.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 111
110 // PageLifecycleObserver 112 // PageLifecycleObserver
111 virtual void contextDestroyed() override; 113 virtual void contextDestroyed() override;
112 114
113 private: 115 private:
114 SpeechRecognition(Page*, ExecutionContext*); 116 SpeechRecognition(Page*, ExecutionContext*);
115 117
116 Member<SpeechGrammarList> m_grammars; 118 Member<SpeechGrammarList> m_grammars;
117 Member<MediaStreamTrack> m_audioTrack; 119 Member<MediaStreamTrack> m_audioTrack;
118 String m_lang; 120 String m_lang;
121 String m_serviceURI;
119 bool m_continuous; 122 bool m_continuous;
120 bool m_interimResults; 123 bool m_interimResults;
121 unsigned long m_maxAlternatives; 124 unsigned long m_maxAlternatives;
122 125
123 RawPtrWillBeMember<SpeechRecognitionController> m_controller; 126 RawPtrWillBeMember<SpeechRecognitionController> m_controller;
124 bool m_stoppedByActiveDOMObject; 127 bool m_stoppedByActiveDOMObject;
125 bool m_started; 128 bool m_started;
126 bool m_stopping; 129 bool m_stopping;
127 HeapVector<Member<SpeechRecognitionResult>> m_finalResults; 130 HeapVector<Member<SpeechRecognitionResult>> m_finalResults;
128 }; 131 };
129 132
130 } // namespace blink 133 } // namespace blink
131 134
132 #endif // SpeechRecognition_h 135 #endif // SpeechRecognition_h
OLDNEW
« no previous file with comments | « LayoutTests/webexposed/global-interface-listing-expected.txt ('k') | Source/modules/speech/SpeechRecognition.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698