OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_BROWSER_SPEECH_SPEECH_INPUT_DISPATCHER_HOST_H_ | 5 #ifndef CHROME_BROWSER_SPEECH_SPEECH_INPUT_DISPATCHER_HOST_H_ |
6 #define CHROME_BROWSER_SPEECH_SPEECH_INPUT_DISPATCHER_HOST_H_ | 6 #define CHROME_BROWSER_SPEECH_SPEECH_INPUT_DISPATCHER_HOST_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/ref_counted.h" | 9 #include "base/ref_counted.h" |
10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 | 39 |
40 private: | 40 private: |
41 class SpeechInputCallers; | 41 class SpeechInputCallers; |
42 friend class base::RefCountedThreadSafe<SpeechInputDispatcherHost>; | 42 friend class base::RefCountedThreadSafe<SpeechInputDispatcherHost>; |
43 | 43 |
44 virtual ~SpeechInputDispatcherHost(); | 44 virtual ~SpeechInputDispatcherHost(); |
45 void SendMessageToRenderView(IPC::Message* message, int render_view_id); | 45 void SendMessageToRenderView(IPC::Message* message, int render_view_id); |
46 | 46 |
47 void OnStartRecognition(int render_view_id, int request_id, | 47 void OnStartRecognition(int render_view_id, int request_id, |
48 const gfx::Rect& element_rect, | 48 const gfx::Rect& element_rect, |
| 49 const std::string& language, |
49 const std::string& grammar); | 50 const std::string& grammar); |
50 void OnCancelRecognition(int render_view_id, int request_id); | 51 void OnCancelRecognition(int render_view_id, int request_id); |
51 void OnStopRecording(int render_view_id, int request_id); | 52 void OnStopRecording(int render_view_id, int request_id); |
52 | 53 |
53 // Returns the speech input manager to forward events to, creating one if | 54 // Returns the speech input manager to forward events to, creating one if |
54 // needed. | 55 // needed. |
55 SpeechInputManager* manager(); | 56 SpeechInputManager* manager(); |
56 | 57 |
57 int resource_message_filter_process_id_; | 58 int resource_message_filter_process_id_; |
58 SpeechInputCallers* callers_; // weak reference to a singleton. | 59 SpeechInputCallers* callers_; // weak reference to a singleton. |
59 | 60 |
60 static SpeechInputManager::AccessorMethod* manager_accessor_; | 61 static SpeechInputManager::AccessorMethod* manager_accessor_; |
61 | 62 |
62 DISALLOW_COPY_AND_ASSIGN(SpeechInputDispatcherHost); | 63 DISALLOW_COPY_AND_ASSIGN(SpeechInputDispatcherHost); |
63 }; | 64 }; |
64 | 65 |
65 } // namespace speech_input | 66 } // namespace speech_input |
66 | 67 |
67 #endif // CHROME_BROWSER_SPEECH_SPEECH_INPUT_DISPATCHER_HOST_H_ | 68 #endif // CHROME_BROWSER_SPEECH_SPEECH_INPUT_DISPATCHER_HOST_H_ |
OLD | NEW |