| 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 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 "modules/speech/DOMWindowSpeechSynthesis.h" | 31 #include "modules/speech/DOMWindowSpeechSynthesis.h" |
| 32 | 32 |
| 33 #include "core/frame/LocalDOMWindow.h" | 33 #include "core/frame/LocalDOMWindow.h" |
| 34 #include "core/frame/LocalFrame.h" | 34 #include "core/frame/LocalFrame.h" |
| 35 #include "wtf/PassRefPtr.h" | 35 #include "wtf/PassRefPtr.h" |
| 36 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 DOMWindowSpeechSynthesis::DOMWindowSpeechSynthesis(LocalDOMWindow& window) | 39 DOMWindowSpeechSynthesis::DOMWindowSpeechSynthesis(LocalDOMWindow& window) |
| 40 : DOMWindowProperty(window.frame()) {} | 40 : ContextClient(window.frame()) {} |
| 41 | 41 |
| 42 const char* DOMWindowSpeechSynthesis::supplementName() { | 42 const char* DOMWindowSpeechSynthesis::supplementName() { |
| 43 return "DOMWindowSpeechSynthesis"; | 43 return "DOMWindowSpeechSynthesis"; |
| 44 } | 44 } |
| 45 | 45 |
| 46 // static | 46 // static |
| 47 DOMWindowSpeechSynthesis& DOMWindowSpeechSynthesis::from( | 47 DOMWindowSpeechSynthesis& DOMWindowSpeechSynthesis::from( |
| 48 LocalDOMWindow& window) { | 48 LocalDOMWindow& window) { |
| 49 DOMWindowSpeechSynthesis* supplement = static_cast<DOMWindowSpeechSynthesis*>( | 49 DOMWindowSpeechSynthesis* supplement = static_cast<DOMWindowSpeechSynthesis*>( |
| 50 Supplement<LocalDOMWindow>::from(window, supplementName())); | 50 Supplement<LocalDOMWindow>::from(window, supplementName())); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 64 SpeechSynthesis* DOMWindowSpeechSynthesis::speechSynthesis() { | 64 SpeechSynthesis* DOMWindowSpeechSynthesis::speechSynthesis() { |
| 65 if (!m_speechSynthesis && frame()) | 65 if (!m_speechSynthesis && frame()) |
| 66 m_speechSynthesis = | 66 m_speechSynthesis = |
| 67 SpeechSynthesis::create(frame()->domWindow()->getExecutionContext()); | 67 SpeechSynthesis::create(frame()->domWindow()->getExecutionContext()); |
| 68 return m_speechSynthesis; | 68 return m_speechSynthesis; |
| 69 } | 69 } |
| 70 | 70 |
| 71 DEFINE_TRACE(DOMWindowSpeechSynthesis) { | 71 DEFINE_TRACE(DOMWindowSpeechSynthesis) { |
| 72 visitor->trace(m_speechSynthesis); | 72 visitor->trace(m_speechSynthesis); |
| 73 Supplement<LocalDOMWindow>::trace(visitor); | 73 Supplement<LocalDOMWindow>::trace(visitor); |
| 74 DOMWindowProperty::trace(visitor); | 74 ContextClient::trace(visitor); |
| 75 } | 75 } |
| 76 | 76 |
| 77 } // namespace blink | 77 } // namespace blink |
| OLD | NEW |