Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/tts_controller_impl.h" | 5 #include "chrome/browser/speech/tts_controller_impl.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/float_util.h" | 10 #include "base/float_util.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 109 // | 109 // |
| 110 // TtsControllerImpl | 110 // TtsControllerImpl |
| 111 // | 111 // |
| 112 | 112 |
| 113 // static | 113 // static |
| 114 TtsControllerImpl* TtsControllerImpl::GetInstance() { | 114 TtsControllerImpl* TtsControllerImpl::GetInstance() { |
| 115 return Singleton<TtsControllerImpl>::get(); | 115 return Singleton<TtsControllerImpl>::get(); |
| 116 } | 116 } |
| 117 | 117 |
| 118 TtsControllerImpl::TtsControllerImpl() | 118 TtsControllerImpl::TtsControllerImpl() |
| 119 : current_utterance_(NULL), | 119 : current_utterance_(0), |
|
mrunal
2014/08/11 23:25:07
Looking at this, I might have mistakenly pushed th
| |
| 120 paused_(false), | 120 paused_(false), |
| 121 platform_impl_(NULL), | 121 platform_impl_(NULL), |
| 122 tts_engine_delegate_(NULL) { | 122 tts_engine_delegate_(NULL) { |
| 123 } | 123 } |
| 124 | 124 |
| 125 TtsControllerImpl::~TtsControllerImpl() { | 125 TtsControllerImpl::~TtsControllerImpl() { |
| 126 if (current_utterance_) { | 126 if (current_utterance_) { |
| 127 current_utterance_->Finish(); | 127 current_utterance_->Finish(); |
| 128 delete current_utterance_; | 128 delete current_utterance_; |
| 129 } | 129 } |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 454 } | 454 } |
| 455 | 455 |
| 456 void TtsControllerImpl::SetTtsEngineDelegate( | 456 void TtsControllerImpl::SetTtsEngineDelegate( |
| 457 TtsEngineDelegate* delegate) { | 457 TtsEngineDelegate* delegate) { |
| 458 tts_engine_delegate_ = delegate; | 458 tts_engine_delegate_ = delegate; |
| 459 } | 459 } |
| 460 | 460 |
| 461 TtsEngineDelegate* TtsControllerImpl::GetTtsEngineDelegate() { | 461 TtsEngineDelegate* TtsControllerImpl::GetTtsEngineDelegate() { |
| 462 return tts_engine_delegate_; | 462 return tts_engine_delegate_; |
| 463 } | 463 } |
| OLD | NEW |