| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Samsung Electronics. All rights reserved. | 2 * Copyright (C) 2013 Samsung Electronics. 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 #include "InternalsSpeechSynthesis.h" | 32 #include "InternalsSpeechSynthesis.h" |
| 33 | 33 |
| 34 #include "core/dom/Document.h" | 34 #include "core/dom/Document.h" |
| 35 #include "core/testing/Internals.h" | 35 #include "core/testing/Internals.h" |
| 36 #include "modules/speech/DOMWindowSpeechSynthesis.h" | 36 #include "modules/speech/DOMWindowSpeechSynthesis.h" |
| 37 #include "modules/speech/SpeechSynthesis.h" | 37 #include "modules/speech/SpeechSynthesis.h" |
| 38 #include "modules/speech/testing/PlatformSpeechSynthesizerMock.h" | 38 #include "modules/speech/testing/PlatformSpeechSynthesizerMock.h" |
| 39 | 39 |
| 40 namespace WebCore { | 40 namespace blink { |
| 41 | 41 |
| 42 void InternalsSpeechSynthesis::enableMockSpeechSynthesizer(Internals&, Document*
document) | 42 void InternalsSpeechSynthesis::enableMockSpeechSynthesizer(Internals&, Document*
document) |
| 43 { | 43 { |
| 44 ASSERT(document && document->domWindow()); | 44 ASSERT(document && document->domWindow()); |
| 45 | 45 |
| 46 SpeechSynthesis* synthesis = DOMWindowSpeechSynthesis::speechSynthesis(*docu
ment->domWindow()); | 46 SpeechSynthesis* synthesis = DOMWindowSpeechSynthesis::speechSynthesis(*docu
ment->domWindow()); |
| 47 if (!synthesis) | 47 if (!synthesis) |
| 48 return; | 48 return; |
| 49 | 49 |
| 50 synthesis->setPlatformSynthesizer(PlatformSpeechSynthesizerMock::create(synt
hesis)); | 50 synthesis->setPlatformSynthesizer(PlatformSpeechSynthesizerMock::create(synt
hesis)); |
| 51 } | 51 } |
| 52 | 52 |
| 53 } // namespace WebCore | 53 } // namespace blink |
| OLD | NEW |