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

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

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 | Annotate | Revision Log
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 "base/bind.h" 7 #include "base/bind.h"
8 #include "content/browser/browser_main_loop.h" 8 #include "content/browser/browser_main_loop.h"
9 #include "content/browser/renderer_host/media/media_stream_manager.h" 9 #include "content/browser/renderer_host/media/media_stream_manager.h"
10 #include "content/browser/renderer_host/media/media_stream_ui_proxy.h" 10 #include "content/browser/renderer_host/media/media_stream_ui_proxy.h"
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 session.recognizer->StopAudioCapture(); 585 session.recognizer->StopAudioCapture();
586 } 586 }
587 587
588 void SpeechRecognitionManagerImpl::ResetCapturingSessionId( 588 void SpeechRecognitionManagerImpl::ResetCapturingSessionId(
589 const Session& session) { 589 const Session& session) {
590 DCHECK_EQ(primary_session_id_, session.id); 590 DCHECK_EQ(primary_session_id_, session.id);
591 primary_session_id_ = kSessionIDInvalid; 591 primary_session_id_ = kSessionIDInvalid;
592 } 592 }
593 593
594 void SpeechRecognitionManagerImpl::SessionDelete(Session* session) { 594 void SpeechRecognitionManagerImpl::SessionDelete(Session* session) {
595 DCHECK(session->recognizer == NULL || !session->recognizer->IsActive()); 595 DCHECK(session->recognizer.get() == NULL || !session->recognizer->IsActive());
596 if (primary_session_id_ == session->id) 596 if (primary_session_id_ == session->id)
597 primary_session_id_ = kSessionIDInvalid; 597 primary_session_id_ = kSessionIDInvalid;
598 sessions_.erase(session->id); 598 sessions_.erase(session->id);
599 delete session; 599 delete session;
600 } 600 }
601 601
602 void SpeechRecognitionManagerImpl::NotFeasible(const Session& session, 602 void SpeechRecognitionManagerImpl::NotFeasible(const Session& session,
603 FSMEvent event) { 603 FSMEvent event) {
604 NOTREACHED() << "Unfeasible event " << event 604 NOTREACHED() << "Unfeasible event " << event
605 << " in state " << GetSessionState(session.id) 605 << " in state " << GetSessionState(session.id)
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 659
660 SpeechRecognitionManagerImpl::Session::Session() 660 SpeechRecognitionManagerImpl::Session::Session()
661 : id(kSessionIDInvalid), 661 : id(kSessionIDInvalid),
662 listener_is_active(true) { 662 listener_is_active(true) {
663 } 663 }
664 664
665 SpeechRecognitionManagerImpl::Session::~Session() { 665 SpeechRecognitionManagerImpl::Session::~Session() {
666 } 666 }
667 667
668 } // namespace content 668 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/browser/speech/speech_recognizer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698