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

Side by Side Diff: content/browser/speech/speech_input_manager.cc

Issue 9369009: Make content::ResourceContext be a real interface like the rest of the Content API (i.e. don't ha... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 8 years, 10 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 #include "content/browser/speech/speech_input_manager.h" 5 #include "content/browser/speech/speech_input_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "content/browser/renderer_host/render_view_host.h" 8 #include "content/browser/renderer_host/render_view_host.h"
9 #include "content/browser/resource_context.h" 9 #include "content/browser/resource_context.h"
10 #include "content/browser/speech/speech_input_preferences.h" 10 #include "content/browser/speech/speech_input_preferences.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 return; 86 return;
87 } 87 }
88 88
89 DCHECK(audio_manager->CanShowAudioInputSettings()); 89 DCHECK(audio_manager->CanShowAudioInputSettings());
90 if (audio_manager->CanShowAudioInputSettings()) 90 if (audio_manager->CanShowAudioInputSettings())
91 audio_manager->ShowAudioInputSettings(); 91 audio_manager->ShowAudioInputSettings();
92 } 92 }
93 93
94 // static 94 // static
95 void SpeechInputManager::ShowAudioInputSettingsFromUI( 95 void SpeechInputManager::ShowAudioInputSettingsFromUI(
96 const content::ResourceContext* resource_context) { 96 content::ResourceContext* resource_context) {
97 if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) { 97 if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
98 BrowserThread::PostTask( 98 BrowserThread::PostTask(
99 BrowserThread::IO, FROM_HERE, 99 BrowserThread::IO, FROM_HERE,
100 base::Bind(&SpeechInputManager::ShowAudioInputSettingsFromUI, 100 base::Bind(&SpeechInputManager::ShowAudioInputSettingsFromUI,
101 base::Unretained(resource_context))); 101 base::Unretained(resource_context)));
102 return; 102 return;
103 } 103 }
104 ShowAudioInputSettings(resource_context->audio_manager()); 104 ShowAudioInputSettings(resource_context->GetAudioManager());
105 } 105 }
106 106
107 void SpeechInputManager::StartRecognition( 107 void SpeechInputManager::StartRecognition(
108 SpeechInputManagerDelegate* delegate, 108 SpeechInputManagerDelegate* delegate,
109 int caller_id, 109 int caller_id,
110 int render_process_id, 110 int render_process_id,
111 int render_view_id, 111 int render_view_id,
112 const gfx::Rect& element_rect, 112 const gfx::Rect& element_rect,
113 const std::string& language, 113 const std::string& language,
114 const std::string& grammar, 114 const std::string& grammar,
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 305
306 SpeechInputManager::SpeechInputRequest::SpeechInputRequest() 306 SpeechInputManager::SpeechInputRequest::SpeechInputRequest()
307 : delegate(NULL), 307 : delegate(NULL),
308 is_active(false) { 308 is_active(false) {
309 } 309 }
310 310
311 SpeechInputManager::SpeechInputRequest::~SpeechInputRequest() { 311 SpeechInputManager::SpeechInputRequest::~SpeechInputRequest() {
312 } 312 }
313 313
314 } // namespace speech_input 314 } // namespace speech_input
OLDNEW
« no previous file with comments | « content/browser/speech/speech_input_manager.h ('k') | content/browser/worker_host/worker_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698