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

Side by Side Diff: chrome/browser/ui/app_list/speech_recognizer.h

Issue 676593003: Implement native speech recognition for the launcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pass in WeakPtr<Delegate>. Created 6 years, 1 month 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/ui/app_list/speech_recognizer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #ifndef CHROME_BROWSER_UI_APP_LIST_SPEECH_RECOGNIZER_H_
6 #define CHROME_BROWSER_UI_APP_LIST_SPEECH_RECOGNIZER_H_
7
8 #include <string>
9
10 #include "base/memory/weak_ptr.h"
11
12 namespace net {
13 class URLRequestContextGetter;
14 }
15
16 namespace app_list {
17
18 class SpeechRecognizerDelegate;
19
20 // SpeechRecognizer is a wrapper around the speech recognition engine that
21 // simplifies its use from the UI thread. This class handles all setup/shutdown,
22 // collection of results, error cases, and threading.
23 class SpeechRecognizer {
24 public:
25 SpeechRecognizer(const base::WeakPtr<SpeechRecognizerDelegate>& delegate,
26 net::URLRequestContextGetter* url_request_context_getter,
27 const std::string& locale);
28 ~SpeechRecognizer();
29
30 // Start/stop the speech recognizer. Must be called on the UI thread.
31 void Start();
32 void Stop();
33
34 private:
35 class EventListener;
36
37 base::WeakPtr<SpeechRecognizerDelegate> delegate_;
38 scoped_refptr<EventListener> speech_event_listener_;
39
40 DISALLOW_COPY_AND_ASSIGN(SpeechRecognizer);
41 };
42
43 } // namespace app_list
44
45 #endif // CHROME_BROWSER_UI_APP_LIST_SPEECH_RECOGNIZER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/speech_recognizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698