Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / extensions / shell / browser / shell_speech_recognition_manager_delegate.h
blob3a040b119e3481545c05fe029218b22bac443494
1 // Copyright 2014 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.
5 #ifndef EXTENSIONS_SHELL_BROWSER_SHELL_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_
6 #define EXTENSIONS_SHELL_BROWSER_SHELL_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_
8 #include "content/public/browser/speech_recognition_event_listener.h"
9 #include "content/public/browser/speech_recognition_manager_delegate.h"
11 namespace extensions {
12 namespace speech {
14 class ShellSpeechRecognitionManagerDelegate
15 : public content::SpeechRecognitionManagerDelegate,
16 public content::SpeechRecognitionEventListener {
17 public:
18 ShellSpeechRecognitionManagerDelegate();
19 ~ShellSpeechRecognitionManagerDelegate() override;
21 private:
22 // SpeechRecognitionEventListener methods.
23 void OnRecognitionStart(int session_id) override;
24 void OnAudioStart(int session_id) override;
25 void OnEnvironmentEstimationComplete(int session_id) override;
26 void OnSoundStart(int session_id) override;
27 void OnSoundEnd(int session_id) override;
28 void OnAudioEnd(int session_id) override;
29 void OnRecognitionEnd(int session_id) override;
30 void OnRecognitionResults(
31 int session_id,
32 const content::SpeechRecognitionResults& result) override;
33 void OnRecognitionError(
34 int session_id,
35 const content::SpeechRecognitionError& error) override;
36 void OnAudioLevelsChange(int session_id,
37 float volume,
38 float noise_volume) override;
40 // SpeechRecognitionManagerDelegate methods.
41 void GetDiagnosticInformation(bool* can_report_metrics,
42 std::string* hardware_info) override;
43 void CheckRecognitionIsAllowed(
44 int session_id,
45 base::Callback<void(bool ask_user, bool is_allowed)> callback) override;
46 content::SpeechRecognitionEventListener* GetEventListener() override;
47 bool FilterProfanities(int render_process_id) override;
49 static void CheckRenderViewType(
50 base::Callback<void(bool ask_user, bool is_allowed)> callback,
51 int render_process_id,
52 int render_view_id);
54 DISALLOW_COPY_AND_ASSIGN(ShellSpeechRecognitionManagerDelegate);
57 } // namespace speech
58 } // namespace extensions
60 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_