OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_RENDERER_TTS_DISPATCHER_H_ | 5 #ifndef CHROME_RENDERER_TTS_DISPATCHER_H_ |
6 #define CHROME_RENDERER_TTS_DISPATCHER_H_ | 6 #define CHROME_RENDERER_TTS_DISPATCHER_H_ |
7 | 7 |
| 8 #include <map> |
8 #include <vector> | 9 #include <vector> |
9 | 10 |
10 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
11 #include "base/containers/hash_tables.h" | |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "content/public/renderer/render_thread_observer.h" | 13 #include "content/public/renderer/render_thread_observer.h" |
14 #include "third_party/WebKit/public/platform/WebSpeechSynthesizer.h" | 14 #include "third_party/WebKit/public/platform/WebSpeechSynthesizer.h" |
15 #include "third_party/WebKit/public/platform/WebSpeechSynthesizerClient.h" | 15 #include "third_party/WebKit/public/platform/WebSpeechSynthesizerClient.h" |
16 | 16 |
17 namespace IPC { | 17 namespace IPC { |
18 class Message; | 18 class Message; |
19 } | 19 } |
20 | 20 |
21 struct TtsVoice; | 21 struct TtsVoice; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 const std::string& error_message); | 61 const std::string& error_message); |
62 | 62 |
63 // The WebKit client class that we use to send events back to the JS world. | 63 // The WebKit client class that we use to send events back to the JS world. |
64 // Weak reference, this will be valid as long as this object exists. | 64 // Weak reference, this will be valid as long as this object exists. |
65 blink::WebSpeechSynthesizerClient* synthesizer_client_; | 65 blink::WebSpeechSynthesizerClient* synthesizer_client_; |
66 | 66 |
67 // Next utterance id, used to map response IPCs to utterance objects. | 67 // Next utterance id, used to map response IPCs to utterance objects. |
68 static int next_utterance_id_; | 68 static int next_utterance_id_; |
69 | 69 |
70 // Map from id to utterance objects. | 70 // Map from id to utterance objects. |
71 base::hash_map<int, blink::WebSpeechSynthesisUtterance> utterance_id_map_; | 71 std::map<int, blink::WebSpeechSynthesisUtterance> utterance_id_map_; |
72 | 72 |
73 DISALLOW_COPY_AND_ASSIGN(TtsDispatcher); | 73 DISALLOW_COPY_AND_ASSIGN(TtsDispatcher); |
74 }; | 74 }; |
75 | 75 |
76 #endif // CHROME_RENDERER_TTS_DISPATCHER_H_ | 76 #endif // CHROME_RENDERER_TTS_DISPATCHER_H_ |
OLD | NEW |