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

Unified Diff: chrome/browser/speech/chrome_speech_recognition_manager_delegate.h

Issue 10663018: Changing tab closure handling logic in speech recognition code and cleaning bubble controller. (Spe… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: jochen review Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/speech/chrome_speech_recognition_manager_delegate.h
diff --git a/chrome/browser/speech/chrome_speech_recognition_manager_delegate.h b/chrome/browser/speech/chrome_speech_recognition_manager_delegate.h
index eb1f4d5b8cc1aa36e32e62d5e56b06f14056f711..696e6369ee89e10d533f6bb6b37fbe7db7c98855 100644
--- a/chrome/browser/speech/chrome_speech_recognition_manager_delegate.h
+++ b/chrome/browser/speech/chrome_speech_recognition_manager_delegate.h
@@ -14,9 +14,9 @@
#include "content/public/browser/speech_recognition_session_config.h"
class SpeechRecognitionTrayIconController;
+class TabWatcher;
namespace speech {
-
// This is Chrome's implementation of the SpeechRecognitionManagerDelegate
// interface.
class ChromeSpeechRecognitionManagerDelegate
@@ -80,6 +80,9 @@ class ChromeSpeechRecognitionManagerDelegate
// (which is copied into |last_session_config_|). Used for "try again".
void RestartLastSession();
+ // Callback called by |tab_watcher_| on the IO thread to signal tab closure.
+ void TabClosedCallback(int render_process_id, int render_view_id);
+
// Lazy initializers for bubble and tray icon controller.
SpeechRecognitionBubbleController* GetBubbleController();
SpeechRecognitionTrayIconController* GetTrayIconController();
@@ -88,9 +91,7 @@ class ChromeSpeechRecognitionManagerDelegate
scoped_refptr<SpeechRecognitionTrayIconController> tray_icon_controller_;
scoped_refptr<OptionalRequestInfo> optional_request_info_;
scoped_ptr<content::SpeechRecognitionSessionConfig> last_session_config_;
-
- // TODO(primiano) this information should be kept into the bubble_controller_.
- int active_bubble_session_id_;
+ scoped_refptr<TabWatcher> tab_watcher_;
DISALLOW_COPY_AND_ASSIGN(ChromeSpeechRecognitionManagerDelegate);
};

Powered by Google App Engine
This is Rietveld 408576698