| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/common/extensions/api/speech/tts_engine_manifest_handler.h" | 5 #include "chrome/common/extensions/api/speech/tts_engine_manifest_handler.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 TtsVoices() {} | 26 TtsVoices() {} |
| 27 ~TtsVoices() override {} | 27 ~TtsVoices() override {} |
| 28 | 28 |
| 29 std::vector<extensions::TtsVoice> voices; | 29 std::vector<extensions::TtsVoice> voices; |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 } // namespace | 32 } // namespace |
| 33 | 33 |
| 34 TtsVoice::TtsVoice() : remote(false) {} | 34 TtsVoice::TtsVoice() : remote(false) {} |
| 35 | 35 |
| 36 TtsVoice::TtsVoice(const TtsVoice& other) = default; |
| 37 |
| 36 TtsVoice::~TtsVoice() {} | 38 TtsVoice::~TtsVoice() {} |
| 37 | 39 |
| 38 // static | 40 // static |
| 39 const std::vector<TtsVoice>* TtsVoice::GetTtsVoices( | 41 const std::vector<TtsVoice>* TtsVoice::GetTtsVoices( |
| 40 const Extension* extension) { | 42 const Extension* extension) { |
| 41 TtsVoices* info = static_cast<TtsVoices*>( | 43 TtsVoices* info = static_cast<TtsVoices*>( |
| 42 extension->GetManifestData(keys::kTtsVoices)); | 44 extension->GetManifestData(keys::kTtsVoices)); |
| 43 return info ? &info->voices : NULL; | 45 return info ? &info->voices : NULL; |
| 44 } | 46 } |
| 45 | 47 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 146 |
| 145 extension->SetManifestData(keys::kTtsVoices, info.release()); | 147 extension->SetManifestData(keys::kTtsVoices, info.release()); |
| 146 return true; | 148 return true; |
| 147 } | 149 } |
| 148 | 150 |
| 149 const std::vector<std::string> TtsEngineManifestHandler::Keys() const { | 151 const std::vector<std::string> TtsEngineManifestHandler::Keys() const { |
| 150 return SingleKey(keys::kTtsEngine); | 152 return SingleKey(keys::kTtsEngine); |
| 151 } | 153 } |
| 152 | 154 |
| 153 } // namespace extensions | 155 } // namespace extensions |
| OLD | NEW |