| OLD | NEW |
| 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 CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_SESSION_CONTEXT_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_SESSION_CONTEXT_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_SESSION_CONTEXT_H_ | 6 #define CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_SESSION_CONTEXT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
| 10 #include "ui/gfx/rect.h" | 10 #include "ui/gfx/rect.h" |
| 11 | 11 |
| 12 namespace content { | 12 namespace content { |
| 13 | 13 |
| 14 // The context information required by clients of the SpeechRecognitionManager | 14 // The context information required by clients of the SpeechRecognitionManager |
| 15 // and its delegates for mapping the recognition session to other browser | 15 // and its delegates for mapping the recognition session to other browser |
| 16 // elements involved with it (e.g., the page element that requested the | 16 // elements involved with it (e.g., the page element that requested the |
| 17 // recognition). The SpeechRecognitionManager is not aware of the content of | 17 // recognition). The manager keeps this struct attached to the recognition |
| 18 // this struct and does NOT use it for its purposes. However the manager keeps | 18 // session during all the session lifetime, making its contents available to |
| 19 // this struct "attached" to the recognition session during all the session | 19 // clients (In this regard, see SpeechRecognitionManager::GetSessionContext and |
| 20 // lifetime, making its contents available to clients (In this regard, see | |
| 21 // SpeechRecognitionManager::GetSessionContext and | |
| 22 // SpeechRecognitionManager::LookupSessionByContext methods). | 20 // SpeechRecognitionManager::LookupSessionByContext methods). |
| 23 struct CONTENT_EXPORT SpeechRecognitionSessionContext { | 21 struct CONTENT_EXPORT SpeechRecognitionSessionContext { |
| 24 SpeechRecognitionSessionContext() | 22 SpeechRecognitionSessionContext() |
| 25 : render_process_id(0), | 23 : render_process_id(0), |
| 26 render_view_id(0), | 24 render_view_id(0), |
| 27 render_request_id(0), | 25 request_id(0) {} |
| 28 js_handle_id(0) {} | |
| 29 ~SpeechRecognitionSessionContext() {} | 26 ~SpeechRecognitionSessionContext() {} |
| 30 | 27 |
| 31 int render_process_id; | 28 int render_process_id; |
| 32 int render_view_id; | 29 int render_view_id; |
| 33 int render_request_id; | 30 int request_id; |
| 34 int js_handle_id; | |
| 35 gfx::Rect element_rect; | 31 gfx::Rect element_rect; |
| 36 }; | 32 }; |
| 37 | 33 |
| 38 } // namespace content | 34 } // namespace content |
| 39 | 35 |
| 40 #endif // CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_SESSION_CONTEXT_H_ | 36 #endif // CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_SESSION_CONTEXT_H_ |
| OLD | NEW |