OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 13 matching lines...) Expand all Loading... |
24 */ | 24 */ |
25 | 25 |
26 #ifndef WebSpeechSynthesisVoice_h | 26 #ifndef WebSpeechSynthesisVoice_h |
27 #define WebSpeechSynthesisVoice_h | 27 #define WebSpeechSynthesisVoice_h |
28 | 28 |
29 #include "WebCommon.h" | 29 #include "WebCommon.h" |
30 #include "WebPrivatePtr.h" | 30 #include "WebPrivatePtr.h" |
31 #include "WebString.h" | 31 #include "WebString.h" |
32 | 32 |
33 namespace blink { | 33 namespace blink { |
| 34 |
34 class PlatformSpeechSynthesisVoice; | 35 class PlatformSpeechSynthesisVoice; |
35 } | |
36 | |
37 namespace blink { | |
38 | 36 |
39 class WebSpeechSynthesisVoice { | 37 class WebSpeechSynthesisVoice { |
40 public: | 38 public: |
41 BLINK_PLATFORM_EXPORT WebSpeechSynthesisVoice(); | 39 BLINK_PLATFORM_EXPORT WebSpeechSynthesisVoice(); |
42 WebSpeechSynthesisVoice(const WebSpeechSynthesisVoice& other) { assign(other
); } | 40 WebSpeechSynthesisVoice(const WebSpeechSynthesisVoice& other) { assign(other
); } |
43 ~WebSpeechSynthesisVoice() { reset(); } | 41 ~WebSpeechSynthesisVoice() { reset(); } |
44 | 42 |
45 WebSpeechSynthesisVoice& operator=(const WebSpeechSynthesisVoice& other) | 43 WebSpeechSynthesisVoice& operator=(const WebSpeechSynthesisVoice& other) |
46 { | 44 { |
47 assign(other); | 45 assign(other); |
48 return *this; | 46 return *this; |
49 } | 47 } |
50 | 48 |
51 BLINK_PLATFORM_EXPORT void assign(const WebSpeechSynthesisVoice&); | 49 BLINK_PLATFORM_EXPORT void assign(const WebSpeechSynthesisVoice&); |
52 BLINK_PLATFORM_EXPORT void reset(); | 50 BLINK_PLATFORM_EXPORT void reset(); |
53 | 51 |
54 BLINK_PLATFORM_EXPORT void setVoiceURI(const WebString&); | 52 BLINK_PLATFORM_EXPORT void setVoiceURI(const WebString&); |
55 BLINK_PLATFORM_EXPORT void setName(const WebString&); | 53 BLINK_PLATFORM_EXPORT void setName(const WebString&); |
56 BLINK_PLATFORM_EXPORT void setLanguage(const WebString&); | 54 BLINK_PLATFORM_EXPORT void setLanguage(const WebString&); |
57 BLINK_PLATFORM_EXPORT void setIsLocalService(bool); | 55 BLINK_PLATFORM_EXPORT void setIsLocalService(bool); |
58 BLINK_PLATFORM_EXPORT void setIsDefault(bool); | 56 BLINK_PLATFORM_EXPORT void setIsDefault(bool); |
59 | 57 |
60 #if INSIDE_BLINK | 58 #if INSIDE_BLINK |
61 BLINK_PLATFORM_EXPORT operator blink::PlatformSpeechSynthesisVoice*() const; | 59 BLINK_PLATFORM_EXPORT operator PlatformSpeechSynthesisVoice*() const; |
62 #endif | 60 #endif |
63 | 61 |
64 private: | 62 private: |
65 WebPrivatePtr<blink::PlatformSpeechSynthesisVoice> m_private; | 63 WebPrivatePtr<PlatformSpeechSynthesisVoice> m_private; |
66 }; | 64 }; |
67 | 65 |
68 } // namespace blink | 66 } // namespace blink |
69 | 67 |
70 #endif // WebSpeechSynthesisVoice_h | 68 #endif // WebSpeechSynthesisVoice_h |
OLD | NEW |