diff options
Diffstat (limited to 'chrome/browser/speech/extension_api')
-rw-r--r-- | chrome/browser/speech/extension_api/tts_engine_extension_api.cc | 16 | ||||
-rw-r--r-- | chrome/browser/speech/extension_api/tts_extension_api.cc | 22 |
2 files changed, 19 insertions, 19 deletions
diff --git a/chrome/browser/speech/extension_api/tts_engine_extension_api.cc b/chrome/browser/speech/extension_api/tts_engine_extension_api.cc index a9cb0a4..9390ea2 100644 --- a/chrome/browser/speech/extension_api/tts_engine_extension_api.cc +++ b/chrome/browser/speech/extension_api/tts_engine_extension_api.cc @@ -133,12 +133,12 @@ void ExtensionTtsEngineSpeak(Utterance* utterance, const VoiceData& voice) { // utterance now. bool sends_end_event = voice.events.find(TTS_EVENT_END) != voice.events.end(); - scoped_ptr<ListValue> args(new ListValue()); - args->Set(0, Value::CreateStringValue(utterance->text())); + scoped_ptr<base::ListValue> args(new base::ListValue()); + args->Set(0, base::Value::CreateStringValue(utterance->text())); // Pass through most options to the speech engine, but remove some // that are handled internally. - scoped_ptr<DictionaryValue> options(static_cast<DictionaryValue*>( + scoped_ptr<base::DictionaryValue> options(static_cast<base::DictionaryValue*>( utterance->options()->DeepCopy())); if (options->HasKey(constants::kRequiredEventTypesKey)) options->Remove(constants::kRequiredEventTypesKey, NULL); @@ -162,7 +162,7 @@ void ExtensionTtsEngineSpeak(Utterance* utterance, const VoiceData& voice) { options->SetString(constants::kLangKey, voice.lang); args->Set(1, options.release()); - args->Set(2, Value::CreateIntegerValue(utterance->id())); + args->Set(2, base::Value::CreateIntegerValue(utterance->id())); scoped_ptr<extensions::Event> event(new extensions::Event( tts_engine_events::kOnSpeak, args.Pass())); @@ -172,7 +172,7 @@ void ExtensionTtsEngineSpeak(Utterance* utterance, const VoiceData& voice) { } void ExtensionTtsEngineStop(Utterance* utterance) { - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); scoped_ptr<extensions::Event> event(new extensions::Event( tts_engine_events::kOnStop, args.Pass())); event->restrict_to_browser_context = utterance->profile(); @@ -181,7 +181,7 @@ void ExtensionTtsEngineStop(Utterance* utterance) { } void ExtensionTtsEnginePause(Utterance* utterance) { - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); scoped_ptr<extensions::Event> event(new extensions::Event( tts_engine_events::kOnPause, args.Pass())); Profile* profile = utterance->profile(); @@ -193,7 +193,7 @@ void ExtensionTtsEnginePause(Utterance* utterance) { } void ExtensionTtsEngineResume(Utterance* utterance) { - scoped_ptr<ListValue> args(new ListValue()); + scoped_ptr<base::ListValue> args(new base::ListValue()); scoped_ptr<extensions::Event> event(new extensions::Event( tts_engine_events::kOnResume, args.Pass())); Profile* profile = utterance->profile(); @@ -208,7 +208,7 @@ bool ExtensionTtsEngineSendTtsEventFunction::RunImpl() { int utterance_id; EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(0, &utterance_id)); - DictionaryValue* event; + base::DictionaryValue* event; EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(1, &event)); std::string event_type; diff --git a/chrome/browser/speech/extension_api/tts_extension_api.cc b/chrome/browser/speech/extension_api/tts_extension_api.cc index 99914f5..e6a34bd 100644 --- a/chrome/browser/speech/extension_api/tts_extension_api.cc +++ b/chrome/browser/speech/extension_api/tts_extension_api.cc @@ -111,7 +111,7 @@ void TtsExtensionEventHandler::OnTtsEvent(Utterance* utterance, } const char *event_type_string = TtsEventTypeToString(event_type); - scoped_ptr<DictionaryValue> details(new DictionaryValue()); + scoped_ptr<base::DictionaryValue> details(new base::DictionaryValue()); if (char_index >= 0) details->SetInteger(constants::kCharIndexKey, char_index); details->SetString(constants::kEventTypeKey, event_type_string); @@ -121,7 +121,7 @@ void TtsExtensionEventHandler::OnTtsEvent(Utterance* utterance, details->SetInteger(constants::kSrcIdKey, utterance->src_id()); details->SetBoolean(constants::kIsFinalEventKey, utterance->finished()); - scoped_ptr<ListValue> arguments(new ListValue()); + scoped_ptr<base::ListValue> arguments(new base::ListValue()); arguments->Set(0, details.release()); scoped_ptr<extensions::Event> event( @@ -144,9 +144,9 @@ bool TtsSpeakFunction::RunImpl() { return false; } - scoped_ptr<DictionaryValue> options(new DictionaryValue()); + scoped_ptr<base::DictionaryValue> options(new base::DictionaryValue()); if (args_->GetSize() >= 2) { - DictionaryValue* temp_options = NULL; + base::DictionaryValue* temp_options = NULL; if (args_->GetDictionary(1, &temp_options)) options.reset(temp_options->DeepCopy()); } @@ -219,7 +219,7 @@ bool TtsSpeakFunction::RunImpl() { std::set<TtsEventType> required_event_types; if (options->HasKey(constants::kRequiredEventTypesKey)) { - ListValue* list; + base::ListValue* list; EXTENSION_FUNCTION_VALIDATE( options->GetList(constants::kRequiredEventTypesKey, &list)); for (size_t i = 0; i < list->GetSize(); ++i) { @@ -231,7 +231,7 @@ bool TtsSpeakFunction::RunImpl() { std::set<TtsEventType> desired_event_types; if (options->HasKey(constants::kDesiredEventTypesKey)) { - ListValue* list; + base::ListValue* list; EXTENSION_FUNCTION_VALIDATE( options->GetList(constants::kDesiredEventTypesKey, &list)); for (size_t i = 0; i < list->GetSize(); ++i) { @@ -302,7 +302,7 @@ bool TtsResumeFunction::RunImpl() { } bool TtsIsSpeakingFunction::RunImpl() { - SetResult(Value::CreateBooleanValue( + SetResult(base::Value::CreateBooleanValue( TtsController::GetInstance()->IsSpeaking())); return true; } @@ -311,10 +311,10 @@ bool TtsGetVoicesFunction::RunImpl() { std::vector<VoiceData> voices; TtsController::GetInstance()->GetVoices(GetProfile(), &voices); - scoped_ptr<ListValue> result_voices(new ListValue()); + scoped_ptr<base::ListValue> result_voices(new base::ListValue()); for (size_t i = 0; i < voices.size(); ++i) { const VoiceData& voice = voices[i]; - DictionaryValue* result_voice = new DictionaryValue(); + base::DictionaryValue* result_voice = new base::DictionaryValue(); result_voice->SetString(constants::kVoiceNameKey, voice.name); result_voice->SetBoolean(constants::kRemoteKey, voice.remote); if (!voice.lang.empty()) @@ -326,11 +326,11 @@ bool TtsGetVoicesFunction::RunImpl() { if (!voice.extension_id.empty()) result_voice->SetString(constants::kExtensionIdKey, voice.extension_id); - ListValue* event_types = new ListValue(); + base::ListValue* event_types = new base::ListValue(); for (std::set<TtsEventType>::iterator iter = voice.events.begin(); iter != voice.events.end(); ++iter) { const char* event_name_constant = TtsEventTypeToString(*iter); - event_types->Append(Value::CreateStringValue(event_name_constant)); + event_types->Append(base::Value::CreateStringValue(event_name_constant)); } result_voice->Set(constants::kEventTypesKey, event_types); |