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

Unified Diff: chrome/browser/speech/tts_win.cc

Issue 2894483002: Migrate from ScopedComPtr::CreateInstance() to CoCreateInstance in chrome/... (Closed)
Patch Set: Fix Header Include Location 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/shell_integration_win.cc ('k') | chrome/browser/ui/views/frame/taskbar_decorator_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/speech/tts_win.cc
diff --git a/chrome/browser/speech/tts_win.cc b/chrome/browser/speech/tts_win.cc
index d2d5153f8d312735e43a42b9c57c10c447173e98..c8665c5f14022747899f6619c55b8a606185440e 100644
--- a/chrome/browser/speech/tts_win.cc
+++ b/chrome/browser/speech/tts_win.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include <math.h>
+#include <objbase.h>
#include <sapi.h>
#include <sphelper.h>
#include <stdint.h>
@@ -317,7 +318,8 @@ TtsPlatformImplWin::TtsPlatformImplWin()
stream_number_(0),
char_position_(0),
paused_(false) {
- speech_synthesizer_.CreateInstance(CLSID_SpVoice);
+ ::CoCreateInstance(CLSID_SpVoice, nullptr, CLSCTX_ALL,
+ IID_PPV_ARGS(&speech_synthesizer_));
if (speech_synthesizer_.Get()) {
ULONGLONG event_mask =
SPFEI(SPEI_START_INPUT_STREAM) |
« no previous file with comments | « chrome/browser/shell_integration_win.cc ('k') | chrome/browser/ui/views/frame/taskbar_decorator_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698