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

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

Issue 10407120: Moving tray icon and notification balloon for background speech recognition sessions to ChromeSpeec… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed win issued ("interface" member clashes with a VS macro name, sigh) Created 8 years, 6 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) 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"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 virtual void GetDiagnosticInformation(bool* can_report_metrics, 52 virtual void GetDiagnosticInformation(bool* can_report_metrics,
53 std::string* hardware_info) OVERRIDE; 53 std::string* hardware_info) OVERRIDE;
54 virtual void CheckRecognitionIsAllowed( 54 virtual void CheckRecognitionIsAllowed(
55 int session_id, 55 int session_id,
56 base::Callback<void(int session_id, bool is_allowed)> callback) OVERRIDE; 56 base::Callback<void(int session_id, bool is_allowed)> callback) OVERRIDE;
57 virtual content::SpeechRecognitionEventListener* GetEventListener() OVERRIDE; 57 virtual content::SpeechRecognitionEventListener* GetEventListener() OVERRIDE;
58 58
59 private: 59 private:
60 class OptionalRequestInfo; 60 class OptionalRequestInfo;
61 61
62 // Shows the recognition tray icon for a given |context_name|, eventually
63 // with a notification balloon. The balloon is shown only once per profile
64 // for a given context_name. |render_process_id| is required to lookup the
65 // profile associated with the renderer that initiated the recognition.
66 static void ShowTrayIconOnUIThread(
67 const std::string& context_name,
68 int render_process_id,
69 scoped_refptr<SpeechRecognitionTrayIconController> tray_icon_controller);
70
62 // Checks for VIEW_TYPE_TAB_CONTENTS host in the UI thread and notifies back 71 // Checks for VIEW_TYPE_TAB_CONTENTS host in the UI thread and notifies back
63 // the result in the IO thread through |callback|. 72 // the result in the IO thread through |callback|.
64 static void CheckRenderViewType( 73 static void CheckRenderViewType(
65 int session_id, 74 int session_id,
66 base::Callback<void(int session_id, bool is_allowed)> callback, 75 base::Callback<void(int session_id, bool is_allowed)> callback,
67 int render_process_id, 76 int render_process_id,
68 int render_view_id); 77 int render_view_id);
69 78
70 // Starts a new recognition session, using the config of the last one 79 // Starts a new recognition session, using the config of the last one
71 // (which is copied into |last_session_config_|). Used for "try again". 80 // (which is copied into |last_session_config_|). Used for "try again".
(...skipping 10 matching lines...) Expand all
82 91
83 // TODO(primiano) this information should be kept into the bubble_controller_. 92 // TODO(primiano) this information should be kept into the bubble_controller_.
84 int active_bubble_session_id_; 93 int active_bubble_session_id_;
85 94
86 DISALLOW_COPY_AND_ASSIGN(ChromeSpeechRecognitionManagerDelegate); 95 DISALLOW_COPY_AND_ASSIGN(ChromeSpeechRecognitionManagerDelegate);
87 }; 96 };
88 97
89 } // namespace speech 98 } // namespace speech
90 99
91 #endif // CHROME_BROWSER_SPEECH_CHROME_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ 100 #endif // CHROME_BROWSER_SPEECH_CHROME_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698