| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/browser/speech/chrome_speech_input_manager.h" | 5 #include "chrome/browser/speech/chrome_speech_input_manager.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
| 10 #include "base/threading/thread_restrictions.h" | 10 #include "base/threading/thread_restrictions.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 80 |
| 81 ~OptionalRequestInfo() {} | 81 ~OptionalRequestInfo() {} |
| 82 | 82 |
| 83 base::Lock lock_; | 83 base::Lock lock_; |
| 84 std::string value_; | 84 std::string value_; |
| 85 bool can_report_metrics_; | 85 bool can_report_metrics_; |
| 86 | 86 |
| 87 DISALLOW_COPY_AND_ASSIGN(OptionalRequestInfo); | 87 DISALLOW_COPY_AND_ASSIGN(OptionalRequestInfo); |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 ChromeSpeechInputManager::SpeechInputRequest::SpeechInputRequest() | |
| 91 : delegate(NULL), | |
| 92 is_active(false) { | |
| 93 } | |
| 94 | |
| 95 ChromeSpeechInputManager::SpeechInputRequest::~SpeechInputRequest() { | |
| 96 } | |
| 97 | |
| 98 ChromeSpeechInputManager* ChromeSpeechInputManager::GetInstance() { | 90 ChromeSpeechInputManager* ChromeSpeechInputManager::GetInstance() { |
| 99 return Singleton<ChromeSpeechInputManager>::get(); | 91 return Singleton<ChromeSpeechInputManager>::get(); |
| 100 } | 92 } |
| 101 | 93 |
| 102 ChromeSpeechInputManager::ChromeSpeechInputManager() | 94 ChromeSpeechInputManager::ChromeSpeechInputManager() |
| 103 : bubble_controller_(new SpeechInputBubbleController( | 95 : bubble_controller_(new SpeechInputBubbleController( |
| 104 ALLOW_THIS_IN_INITIALIZER_LIST(this))) { | 96 ALLOW_THIS_IN_INITIALIZER_LIST(this))) { |
| 105 } | 97 } |
| 106 | 98 |
| 107 ChromeSpeechInputManager::~ChromeSpeechInputManager() { | 99 ChromeSpeechInputManager::~ChromeSpeechInputManager() { |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 StartRecognitionForRequest(caller_id); | 195 StartRecognitionForRequest(caller_id); |
| 204 } | 196 } |
| 205 } | 197 } |
| 206 | 198 |
| 207 void ChromeSpeechInputManager::InfoBubbleFocusChanged(int caller_id) { | 199 void ChromeSpeechInputManager::InfoBubbleFocusChanged(int caller_id) { |
| 208 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 200 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 209 OnFocusChanged(caller_id); | 201 OnFocusChanged(caller_id); |
| 210 } | 202 } |
| 211 | 203 |
| 212 } // namespace speech_input | 204 } // namespace speech_input |
| OLD | NEW |