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

Side by Side Diff: content/browser/speech/speech_recognition_manager_impl.cc

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/browser/speech/speech_recognition_manager_impl.h" 5 #include "content/browser/speech/speech_recognition_manager_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 base::ThreadTaskRunnerHandle::Get()->PostTask( 222 base::ThreadTaskRunnerHandle::Get()->PostTask(
223 FROM_HERE, 223 FROM_HERE,
224 base::Bind(&SpeechRecognitionManagerImpl::DispatchEvent, 224 base::Bind(&SpeechRecognitionManagerImpl::DispatchEvent,
225 weak_factory_.GetWeakPtr(), session_id, EVENT_ABORT)); 225 weak_factory_.GetWeakPtr(), session_id, EVENT_ABORT));
226 } 226 }
227 } 227 }
228 228
229 void SpeechRecognitionManagerImpl::MediaRequestPermissionCallback( 229 void SpeechRecognitionManagerImpl::MediaRequestPermissionCallback(
230 int session_id, 230 int session_id,
231 const MediaStreamDevices& devices, 231 const MediaStreamDevices& devices,
232 scoped_ptr<MediaStreamUIProxy> stream_ui) { 232 std::unique_ptr<MediaStreamUIProxy> stream_ui) {
233 DCHECK_CURRENTLY_ON(BrowserThread::IO); 233 DCHECK_CURRENTLY_ON(BrowserThread::IO);
234 234
235 SessionsTable::iterator iter = sessions_.find(session_id); 235 SessionsTable::iterator iter = sessions_.find(session_id);
236 if (iter == sessions_.end()) 236 if (iter == sessions_.end())
237 return; 237 return;
238 238
239 bool is_allowed = !devices.empty(); 239 bool is_allowed = !devices.empty();
240 if (is_allowed) { 240 if (is_allowed) {
241 // Copy the approved devices array to the context for UI indication. 241 // Copy the approved devices array to the context for UI indication.
242 iter->second->context.devices = devices; 242 iter->second->context.devices = devices;
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 SpeechRecognitionManagerImpl::Session::Session() 684 SpeechRecognitionManagerImpl::Session::Session()
685 : id(kSessionIDInvalid), 685 : id(kSessionIDInvalid),
686 abort_requested(false), 686 abort_requested(false),
687 listener_is_active(true) { 687 listener_is_active(true) {
688 } 688 }
689 689
690 SpeechRecognitionManagerImpl::Session::~Session() { 690 SpeechRecognitionManagerImpl::Session::~Session() {
691 } 691 }
692 692
693 } // namespace content 693 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/speech/speech_recognition_manager_impl.h ('k') | content/browser/speech/speech_recognizer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698