| OLD | NEW |
| 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 15 matching lines...) Expand all Loading... |
| 26 #ifndef SpeechGrammarList_h | 26 #ifndef SpeechGrammarList_h |
| 27 #define SpeechGrammarList_h | 27 #define SpeechGrammarList_h |
| 28 | 28 |
| 29 #include "bindings/core/v8/ScriptWrappable.h" | 29 #include "bindings/core/v8/ScriptWrappable.h" |
| 30 #include "modules/ModulesExport.h" | 30 #include "modules/ModulesExport.h" |
| 31 #include "modules/speech/SpeechGrammar.h" | 31 #include "modules/speech/SpeechGrammar.h" |
| 32 #include "platform/heap/Handle.h" | 32 #include "platform/heap/Handle.h" |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 class ExecutionContext; | 36 class ScriptState; |
| 37 | 37 |
| 38 class MODULES_EXPORT SpeechGrammarList final | 38 class MODULES_EXPORT SpeechGrammarList final |
| 39 : public GarbageCollected<SpeechGrammarList>, | 39 : public GarbageCollected<SpeechGrammarList>, |
| 40 public ScriptWrappable { | 40 public ScriptWrappable { |
| 41 DEFINE_WRAPPERTYPEINFO(); | 41 DEFINE_WRAPPERTYPEINFO(); |
| 42 | 42 |
| 43 public: | 43 public: |
| 44 static SpeechGrammarList* create(); | 44 static SpeechGrammarList* create(); |
| 45 | 45 |
| 46 unsigned length() const { return m_grammars.size(); } | 46 unsigned length() const { return m_grammars.size(); } |
| 47 SpeechGrammar* item(unsigned) const; | 47 SpeechGrammar* item(unsigned) const; |
| 48 | 48 |
| 49 void addFromUri(ExecutionContext*, const String& src, double weight = 1.0); | 49 void addFromUri(ScriptState*, const String& src, double weight = 1.0); |
| 50 void addFromString(const String&, double weight = 1.0); | 50 void addFromString(const String&, double weight = 1.0); |
| 51 | 51 |
| 52 DECLARE_TRACE(); | 52 DECLARE_TRACE(); |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 SpeechGrammarList(); | 55 SpeechGrammarList(); |
| 56 | 56 |
| 57 HeapVector<Member<SpeechGrammar>> m_grammars; | 57 HeapVector<Member<SpeechGrammar>> m_grammars; |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 } // namespace blink | 60 } // namespace blink |
| 61 | 61 |
| 62 #endif // SpeechGrammarList_h | 62 #endif // SpeechGrammarList_h |
| OLD | NEW |