| 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 19 matching lines...) Expand all Loading... |
| 30 namespace blink { | 30 namespace blink { |
| 31 | 31 |
| 32 SpeechGrammar* SpeechGrammar::create() { | 32 SpeechGrammar* SpeechGrammar::create() { |
| 33 return new SpeechGrammar; | 33 return new SpeechGrammar; |
| 34 } | 34 } |
| 35 | 35 |
| 36 SpeechGrammar* SpeechGrammar::create(const KURL& src, double weight) { | 36 SpeechGrammar* SpeechGrammar::create(const KURL& src, double weight) { |
| 37 return new SpeechGrammar(src, weight); | 37 return new SpeechGrammar(src, weight); |
| 38 } | 38 } |
| 39 | 39 |
| 40 void SpeechGrammar::setSrc(ExecutionContext* executionContext, | 40 void SpeechGrammar::setSrc(ScriptState* scriptState, const String& src) { |
| 41 const String& src) { | 41 Document* document = toDocument(scriptState->getExecutionContext()); |
| 42 Document* document = toDocument(executionContext); | |
| 43 m_src = document->completeURL(src); | 42 m_src = document->completeURL(src); |
| 44 } | 43 } |
| 45 | 44 |
| 46 SpeechGrammar::SpeechGrammar() : m_weight(1.0) {} | 45 SpeechGrammar::SpeechGrammar() : m_weight(1.0) {} |
| 47 | 46 |
| 48 SpeechGrammar::SpeechGrammar(const KURL& src, double weight) | 47 SpeechGrammar::SpeechGrammar(const KURL& src, double weight) |
| 49 : m_src(src), m_weight(weight) {} | 48 : m_src(src), m_weight(weight) {} |
| 50 | 49 |
| 51 } // namespace blink | 50 } // namespace blink |
| OLD | NEW |