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

Side by Side Diff: chrome/browser/speech/chrome_speech_recognition_manager_delegate.h

Issue 1892483002: Drop support for uploading hardware info with speech recognition requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@devirtualize_speechrecognitionengine
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
« no previous file with comments | « no previous file | chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_SPEECH_CHROME_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_SPEECH_CHROME_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_
6 #define CHROME_BROWSER_SPEECH_CHROME_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ 6 #define CHROME_BROWSER_SPEECH_CHROME_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 25 matching lines...) Expand all
36 int session_id, 36 int session_id,
37 const content::SpeechRecognitionResults& result) override; 37 const content::SpeechRecognitionResults& result) override;
38 void OnRecognitionError( 38 void OnRecognitionError(
39 int session_id, 39 int session_id,
40 const content::SpeechRecognitionError& error) override; 40 const content::SpeechRecognitionError& error) override;
41 void OnAudioLevelsChange(int session_id, 41 void OnAudioLevelsChange(int session_id,
42 float volume, 42 float volume,
43 float noise_volume) override; 43 float noise_volume) override;
44 44
45 // SpeechRecognitionManagerDelegate methods. 45 // SpeechRecognitionManagerDelegate methods.
46 void GetDiagnosticInformation(bool* can_report_metrics,
47 std::string* hardware_info) override;
48 void CheckRecognitionIsAllowed( 46 void CheckRecognitionIsAllowed(
49 int session_id, 47 int session_id,
50 base::Callback<void(bool ask_user, bool is_allowed)> callback) override; 48 base::Callback<void(bool ask_user, bool is_allowed)> callback) override;
51 content::SpeechRecognitionEventListener* GetEventListener() override; 49 content::SpeechRecognitionEventListener* GetEventListener() override;
52 bool FilterProfanities(int render_process_id) override; 50 bool FilterProfanities(int render_process_id) override;
53 51
54 // Callback called by |tab_watcher_| on the IO thread to signal tab closure. 52 // Callback called by |tab_watcher_| on the IO thread to signal tab closure.
55 virtual void TabClosedCallback(int render_process_id, int render_view_id); 53 virtual void TabClosedCallback(int render_process_id, int render_view_id);
56 54
57 private: 55 private:
58 class OptionalRequestInfo;
59 class TabWatcher; 56 class TabWatcher;
60 57
61 // Checks for VIEW_TYPE_TAB_CONTENTS host in the UI thread and notifies back 58 // Checks for VIEW_TYPE_TAB_CONTENTS host in the UI thread and notifies back
62 // the result in the IO thread through |callback|. 59 // the result in the IO thread through |callback|.
63 static void CheckRenderViewType( 60 static void CheckRenderViewType(
64 base::Callback<void(bool ask_user, bool is_allowed)> callback, 61 base::Callback<void(bool ask_user, bool is_allowed)> callback,
65 int render_process_id, 62 int render_process_id,
66 int render_view_id); 63 int render_view_id);
67 64
68 scoped_refptr<OptionalRequestInfo> optional_request_info_;
69 scoped_refptr<TabWatcher> tab_watcher_; 65 scoped_refptr<TabWatcher> tab_watcher_;
70 66
71 DISALLOW_COPY_AND_ASSIGN(ChromeSpeechRecognitionManagerDelegate); 67 DISALLOW_COPY_AND_ASSIGN(ChromeSpeechRecognitionManagerDelegate);
72 }; 68 };
73 69
74 } // namespace speech 70 } // namespace speech
75 71
76 #endif // CHROME_BROWSER_SPEECH_CHROME_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ 72 #endif // CHROME_BROWSER_SPEECH_CHROME_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698