Home | History | Annotate | Download | only in browser
      1 // Copyright 2013 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #include "content/shell/browser/shell_speech_recognition_manager_delegate.h"
      6 
      7 #include "content/public/browser/browser_thread.h"
      8 
      9 using base::Callback;
     10 
     11 namespace content {
     12 
     13 void ShellSpeechRecognitionManagerDelegate::CheckRecognitionIsAllowed(
     14     int session_id, Callback<void(bool ask_user, bool is_allowed)> callback) {
     15   // In content_shell, we expect speech recognition to happen when requested.
     16   // Therefore we simply authorize it by calling back with is_allowed=true. The
     17   // first parameter, ask_user, is set to false because we don't want to prompt
     18   // the user for permission with an infobar.
     19   BrowserThread::PostTask(
     20       BrowserThread::IO, FROM_HERE, base::Bind(callback, false, true));
     21 }
     22 
     23 SpeechRecognitionEventListener*
     24     ShellSpeechRecognitionManagerDelegate::GetEventListener() {
     25   return NULL;
     26 }
     27 
     28 bool ShellSpeechRecognitionManagerDelegate::FilterProfanities(
     29     int render_process_id) {
     30   return false;
     31 }
     32 
     33 }  // namespace content
     34