Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Side by Side Diff: third_party/WebKit/Source/platform/speech/PlatformSpeechSynthesizer.cpp

Issue 2846843002: [blink] Unique pointers in Platform.h (Closed)
Patch Set: fix compilation (and again) Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2013 Apple Computer, Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 30 matching lines...) Expand all
41 new PlatformSpeechSynthesizer(client); 41 new PlatformSpeechSynthesizer(client);
42 synthesizer->InitializeVoiceList(); 42 synthesizer->InitializeVoiceList();
43 return synthesizer; 43 return synthesizer;
44 } 44 }
45 45
46 PlatformSpeechSynthesizer::PlatformSpeechSynthesizer( 46 PlatformSpeechSynthesizer::PlatformSpeechSynthesizer(
47 PlatformSpeechSynthesizerClient* client) 47 PlatformSpeechSynthesizerClient* client)
48 : speech_synthesizer_client_(client) { 48 : speech_synthesizer_client_(client) {
49 web_speech_synthesizer_client_ = 49 web_speech_synthesizer_client_ =
50 new WebSpeechSynthesizerClientImpl(this, client); 50 new WebSpeechSynthesizerClientImpl(this, client);
51 web_speech_synthesizer_ = 51 web_speech_synthesizer_ = Platform::Current()->CreateSpeechSynthesizer(
52 WTF::WrapUnique(Platform::Current()->CreateSpeechSynthesizer( 52 web_speech_synthesizer_client_);
53 web_speech_synthesizer_client_));
54 } 53 }
55 54
56 PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer() {} 55 PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer() {}
57 56
58 void PlatformSpeechSynthesizer::Speak( 57 void PlatformSpeechSynthesizer::Speak(
59 PlatformSpeechSynthesisUtterance* utterance) { 58 PlatformSpeechSynthesisUtterance* utterance) {
60 if (web_speech_synthesizer_ && web_speech_synthesizer_client_) 59 if (web_speech_synthesizer_ && web_speech_synthesizer_client_)
61 web_speech_synthesizer_->Speak(WebSpeechSynthesisUtterance(utterance)); 60 web_speech_synthesizer_->Speak(WebSpeechSynthesisUtterance(utterance));
62 } 61 }
63 62
(...skipping 21 matching lines...) Expand all
85 if (web_speech_synthesizer_) 84 if (web_speech_synthesizer_)
86 web_speech_synthesizer_->UpdateVoiceList(); 85 web_speech_synthesizer_->UpdateVoiceList();
87 } 86 }
88 87
89 DEFINE_TRACE(PlatformSpeechSynthesizer) { 88 DEFINE_TRACE(PlatformSpeechSynthesizer) {
90 visitor->Trace(speech_synthesizer_client_); 89 visitor->Trace(speech_synthesizer_client_);
91 visitor->Trace(web_speech_synthesizer_client_); 90 visitor->Trace(web_speech_synthesizer_client_);
92 } 91 }
93 92
94 } // namespace blink 93 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/mediastream/MediaStreamCenter.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698