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

Side by Side Diff: content/browser/speech/speech_recognition_request.h

Issue 7981049: Fix more symbol exports and a compile failure for the component build of (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_REQUEST_H_ 5 #ifndef CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_REQUEST_H_
6 #define CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_REQUEST_H_ 6 #define CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_REQUEST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "content/common/content_export.h"
14 #include "content/common/net/url_fetcher.h" 15 #include "content/common/net/url_fetcher.h"
15 #include "content/common/speech_input_result.h" 16 #include "content/common/speech_input_result.h"
16 #include "googleurl/src/gurl.h" 17 #include "googleurl/src/gurl.h"
17 18
18 class URLFetcher; 19 class URLFetcher;
19 20
20 namespace net { 21 namespace net {
21 class URLRequestContextGetter; 22 class URLRequestContextGetter;
22 } 23 }
23 24
24 namespace speech_input { 25 namespace speech_input {
25 26
26 // Provides a simple interface for sending recorded speech data to the server 27 // Provides a simple interface for sending recorded speech data to the server
27 // and get back recognition results. 28 // and get back recognition results.
28 class SpeechRecognitionRequest : public URLFetcher::Delegate { 29 class SpeechRecognitionRequest : public URLFetcher::Delegate {
29 public: 30 public:
30 // ID passed to URLFetcher::Create(). Used for testing. 31 // ID passed to URLFetcher::Create(). Used for testing.
31 static int url_fetcher_id_for_tests; 32 static int url_fetcher_id_for_tests;
32 33
33 // Interface for receiving callbacks from this object. 34 // Interface for receiving callbacks from this object.
34 class Delegate { 35 class CONTENT_EXPORT Delegate {
35 public: 36 public:
36 virtual void SetRecognitionResult( 37 virtual void SetRecognitionResult(
37 bool error, const SpeechInputResultArray& result) = 0; 38 bool error, const SpeechInputResultArray& result) = 0;
38 39
39 protected: 40 protected:
40 virtual ~Delegate() {} 41 virtual ~Delegate() {}
41 }; 42 };
42 43
43 // |url| is the server address to which the request wil be sent. 44 // |url| is the server address to which the request wil be sent.
44 SpeechRecognitionRequest(net::URLRequestContextGetter* context, 45 SpeechRecognitionRequest(net::URLRequestContextGetter* context,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 80
80 // This typedef is to workaround the issue with certain versions of 81 // This typedef is to workaround the issue with certain versions of
81 // Visual Studio where it gets confused between multiple Delegate 82 // Visual Studio where it gets confused between multiple Delegate
82 // classes and gives a C2500 error. (I saw this error on the try bots - 83 // classes and gives a C2500 error. (I saw this error on the try bots -
83 // the workaround was not needed for my machine). 84 // the workaround was not needed for my machine).
84 typedef SpeechRecognitionRequest::Delegate SpeechRecognitionRequestDelegate; 85 typedef SpeechRecognitionRequest::Delegate SpeechRecognitionRequestDelegate;
85 86
86 } // namespace speech_input 87 } // namespace speech_input
87 88
88 #endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_REQUEST_H_ 89 #endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_REQUEST_H_
OLDNEW
« no previous file with comments | « content/browser/speech/speech_input_manager.cc ('k') | content/browser/speech/speech_recognizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698