| 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 24 matching lines...) Expand all Loading... |
| 35 namespace blink { | 35 namespace blink { |
| 36 | 36 |
| 37 class ExecutionContext; | 37 class ExecutionContext; |
| 38 | 38 |
| 39 class MODULES_EXPORT SpeechGrammar final | 39 class MODULES_EXPORT SpeechGrammar final |
| 40 : public GarbageCollectedFinalized<SpeechGrammar>, | 40 : public GarbageCollectedFinalized<SpeechGrammar>, |
| 41 public ScriptWrappable { | 41 public ScriptWrappable { |
| 42 DEFINE_WRAPPERTYPEINFO(); | 42 DEFINE_WRAPPERTYPEINFO(); |
| 43 | 43 |
| 44 public: | 44 public: |
| 45 static SpeechGrammar* | 45 static SpeechGrammar* create(); // FIXME: The spec is not clear on what the |
| 46 create(); // FIXME: The spec is not clear on what the constructor should look
like. | 46 // constructor should look like. |
| 47 static SpeechGrammar* create(const KURL& src, double weight); | 47 static SpeechGrammar* create(const KURL& src, double weight); |
| 48 | 48 |
| 49 const KURL& src(ExecutionContext*) const { return m_src; } | 49 const KURL& src(ExecutionContext*) const { return m_src; } |
| 50 const KURL& src() const { return m_src; } | 50 const KURL& src() const { return m_src; } |
| 51 void setSrc(ExecutionContext*, const String& src); | 51 void setSrc(ExecutionContext*, const String& src); |
| 52 | 52 |
| 53 double weight() const { return m_weight; } | 53 double weight() const { return m_weight; } |
| 54 void setWeight(double weight) { m_weight = weight; } | 54 void setWeight(double weight) { m_weight = weight; } |
| 55 | 55 |
| 56 DEFINE_INLINE_TRACE() {} | 56 DEFINE_INLINE_TRACE() {} |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 SpeechGrammar(); | 59 SpeechGrammar(); |
| 60 SpeechGrammar(const KURL& src, double weight); | 60 SpeechGrammar(const KURL& src, double weight); |
| 61 | 61 |
| 62 KURL m_src; | 62 KURL m_src; |
| 63 double m_weight; | 63 double m_weight; |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 } // namespace blink | 66 } // namespace blink |
| 67 | 67 |
| 68 #endif // SpeechGrammar_h | 68 #endif // SpeechGrammar_h |
| OLD | NEW |