blob: 808a1091e67808cf042a1b21c973787c99be1c64 [file] [log] [blame]
[email protected]9896c552013-08-29 19:03:201// 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#ifndef CONTENT_SHELL_BROWSER_SHELL_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_
6#define CONTENT_SHELL_BROWSER_SHELL_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_
7
8#include "base/bind.h"
9#include "base/compiler_specific.h"
avi66a07722015-12-25 23:38:1210#include "base/macros.h"
[email protected]9896c552013-08-29 19:03:2011#include "content/public/browser/speech_recognition_event_listener.h"
12#include "content/public/browser/speech_recognition_manager_delegate.h"
13
14namespace content {
15
16// This is content_shell's delegate used by the speech recognition manager to
17// check for permission to record audio. For content_shell, we always authorize
18// speech recognition (see crbug.com/237119).
19class ShellSpeechRecognitionManagerDelegate
20 : public SpeechRecognitionManagerDelegate {
21 public:
22 ShellSpeechRecognitionManagerDelegate() {}
dchenge933b3e2014-10-21 11:44:0923 ~ShellSpeechRecognitionManagerDelegate() override {}
[email protected]9896c552013-08-29 19:03:2024
25 // SpeechRecognitionManagerDelegate methods.
dchenge933b3e2014-10-21 11:44:0926 void CheckRecognitionIsAllowed(
27 int session_id,
Mark Pilgrim6e0ef1f2017-07-12 14:31:4628 base::OnceCallback<void(bool ask_user, bool is_allowed)> callback)
29 override;
dchenge933b3e2014-10-21 11:44:0930 SpeechRecognitionEventListener* GetEventListener() override;
31 bool FilterProfanities(int render_process_id) override;
[email protected]9896c552013-08-29 19:03:2032
33 private:
34 DISALLOW_COPY_AND_ASSIGN(ShellSpeechRecognitionManagerDelegate);
35};
36
37} // namespace content
38
39#endif // CONTENT_SHELL_BROWSER_SHELL_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_