| OLD | NEW |
| 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/content_export.h" |
| 15 #include "content/public/common/url_fetcher_delegate.h" | 15 #include "content/public/common/url_fetcher_delegate.h" |
| 16 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
| 17 | 17 |
| 18 class URLFetcher; | 18 class URLFetcher; |
| 19 | 19 |
| 20 namespace content { | 20 namespace content { |
| 21 struct SpeechInputResult; | 21 struct SpeechInputResult; |
| 22 } | 22 } |
| 23 | 23 |
| 24 namespace net { | 24 namespace net { |
| 25 class URLRequestContextGetter; | 25 class URLRequestContextGetter; |
| 26 } | 26 } |
| 27 | 27 |
| 28 namespace speech_input { | 28 namespace speech { |
| 29 | 29 |
| 30 // Provides a simple interface for sending recorded speech data to the server | 30 // Provides a simple interface for sending recorded speech data to the server |
| 31 // and get back recognition results. | 31 // and get back recognition results. |
| 32 class SpeechRecognitionRequest : public content::URLFetcherDelegate { | 32 class SpeechRecognitionRequest : public content::URLFetcherDelegate { |
| 33 public: | 33 public: |
| 34 // ID passed to URLFetcher::Create(). Used for testing. | 34 // ID passed to URLFetcher::Create(). Used for testing. |
| 35 CONTENT_EXPORT static int url_fetcher_id_for_tests; | 35 CONTENT_EXPORT static int url_fetcher_id_for_tests; |
| 36 | 36 |
| 37 // Interface for receiving callbacks from this object. | 37 // Interface for receiving callbacks from this object. |
| 38 class CONTENT_EXPORT Delegate { | 38 class CONTENT_EXPORT Delegate { |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 76 |
| 77 DISALLOW_COPY_AND_ASSIGN(SpeechRecognitionRequest); | 77 DISALLOW_COPY_AND_ASSIGN(SpeechRecognitionRequest); |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 // This typedef is to workaround the issue with certain versions of | 80 // This typedef is to workaround the issue with certain versions of |
| 81 // Visual Studio where it gets confused between multiple Delegate | 81 // Visual Studio where it gets confused between multiple Delegate |
| 82 // classes and gives a C2500 error. (I saw this error on the try bots - | 82 // classes and gives a C2500 error. (I saw this error on the try bots - |
| 83 // the workaround was not needed for my machine). | 83 // the workaround was not needed for my machine). |
| 84 typedef SpeechRecognitionRequest::Delegate SpeechRecognitionRequestDelegate; | 84 typedef SpeechRecognitionRequest::Delegate SpeechRecognitionRequestDelegate; |
| 85 | 85 |
| 86 } // namespace speech_input | 86 } // namespace speech |
| 87 | 87 |
| 88 #endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_REQUEST_H_ | 88 #endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_REQUEST_H_ |
| OLD | NEW |