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

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

Issue 10377082: SpeechInputExtensionManager now interface with SpeechRecognitionManagerDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase before dcommit Created 8 years, 7 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
« 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 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "chrome/browser/speech/speech_recognition_bubble_controller.h" 11 #include "chrome/browser/speech/speech_recognition_bubble_controller.h"
12 #include "content/public/browser/speech_recognition_event_listener.h" 12 #include "content/public/browser/speech_recognition_event_listener.h"
13 #include "content/public/browser/speech_recognition_manager_delegate.h" 13 #include "content/public/browser/speech_recognition_manager_delegate.h"
14 #include "content/public/browser/speech_recognition_session_config.h" 14 #include "content/public/browser/speech_recognition_session_config.h"
15 15
16 class SpeechRecognitionTrayIconController;
17
16 namespace speech { 18 namespace speech {
17 19
18 // This is Chrome's implementation of the SpeechRecognitionManagerDelegate 20 // This is Chrome's implementation of the SpeechRecognitionManagerDelegate
19 // interface. 21 // interface.
20 class ChromeSpeechRecognitionManagerDelegate 22 class ChromeSpeechRecognitionManagerDelegate
21 : NON_EXPORTED_BASE(public content::SpeechRecognitionManagerDelegate), 23 : NON_EXPORTED_BASE(public content::SpeechRecognitionManagerDelegate),
22 public content::SpeechRecognitionEventListener, 24 public content::SpeechRecognitionEventListener,
23 public SpeechRecognitionBubbleControllerDelegate { 25 public SpeechRecognitionBubbleControllerDelegate {
24 public: 26 public:
25 ChromeSpeechRecognitionManagerDelegate(); 27 ChromeSpeechRecognitionManagerDelegate();
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 static void CheckRenderViewType( 64 static void CheckRenderViewType(
63 int session_id, 65 int session_id,
64 base::Callback<void(int session_id, bool is_allowed)> callback, 66 base::Callback<void(int session_id, bool is_allowed)> callback,
65 int render_process_id, 67 int render_process_id,
66 int render_view_id); 68 int render_view_id);
67 69
68 // Starts a new recognition session, using the config of the last one 70 // Starts a new recognition session, using the config of the last one
69 // (which is copied into |last_session_config_|). Used for "try again". 71 // (which is copied into |last_session_config_|). Used for "try again".
70 void RestartLastSession(); 72 void RestartLastSession();
71 73
74 // Lazy initializers for bubble and tray icon controller.
75 SpeechRecognitionBubbleController* GetBubbleController();
76 SpeechRecognitionTrayIconController* GetTrayIconController();
77
72 scoped_refptr<SpeechRecognitionBubbleController> bubble_controller_; 78 scoped_refptr<SpeechRecognitionBubbleController> bubble_controller_;
79 scoped_refptr<SpeechRecognitionTrayIconController> tray_icon_controller_;
73 scoped_refptr<OptionalRequestInfo> optional_request_info_; 80 scoped_refptr<OptionalRequestInfo> optional_request_info_;
74 scoped_ptr<content::SpeechRecognitionSessionConfig> last_session_config_; 81 scoped_ptr<content::SpeechRecognitionSessionConfig> last_session_config_;
75 82
76 // TODO(primiano) this information should be kept into the bubble_controller_. 83 // TODO(primiano) this information should be kept into the bubble_controller_.
77 int active_bubble_session_id_; 84 int active_bubble_session_id_;
78 85
79 DISALLOW_COPY_AND_ASSIGN(ChromeSpeechRecognitionManagerDelegate); 86 DISALLOW_COPY_AND_ASSIGN(ChromeSpeechRecognitionManagerDelegate);
80 }; 87 };
81 88
82 } // namespace speech 89 } // namespace speech
83 90
84 #endif // CHROME_BROWSER_SPEECH_CHROME_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ 91 #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