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

Side by Side Diff: chrome/browser/speech/speech_input_extension_manager.cc

Issue 10824030: Move ExtensionHost into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest master for cq Created 8 years, 4 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
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 "chrome/browser/speech/speech_input_extension_manager.h" 5 #include "chrome/browser/speech/speech_input_extension_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 VLOG(1) << "State changed to idle. Deassociating any extensions."; 248 VLOG(1) << "State changed to idle. Deassociating any extensions.";
249 state_ = kIdle; 249 state_ = kIdle;
250 extension_id_in_use_.clear(); 250 extension_id_in_use_.clear();
251 } 251 }
252 252
253 int SpeechInputExtensionManager::GetRenderProcessIDForExtension( 253 int SpeechInputExtensionManager::GetRenderProcessIDForExtension(
254 const std::string& extension_id) const { 254 const std::string& extension_id) const {
255 ExtensionProcessManager* epm = 255 ExtensionProcessManager* epm =
256 extensions::ExtensionSystem::Get(profile_)->process_manager(); 256 extensions::ExtensionSystem::Get(profile_)->process_manager();
257 DCHECK(epm); 257 DCHECK(epm);
258 ExtensionHost* eh = epm->GetBackgroundHostForExtension(extension_id); 258 extensions::ExtensionHost* eh =
259 epm->GetBackgroundHostForExtension(extension_id);
259 DCHECK(eh); 260 DCHECK(eh);
260 content::RenderProcessHost* rph = eh->render_process_host(); 261 content::RenderProcessHost* rph = eh->render_process_host();
261 DCHECK(rph); 262 DCHECK(rph);
262 return rph->GetID(); 263 return rph->GetID();
263 } 264 }
264 265
265 void SpeechInputExtensionManager::OnRecognitionResult( 266 void SpeechInputExtensionManager::OnRecognitionResult(
266 int session_id, 267 int session_id,
267 const content::SpeechRecognitionResult& result) { 268 const content::SpeechRecognitionResult& result) {
268 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 269 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 content::NotificationService::current()->Notify( 766 content::NotificationService::current()->Notify(
766 chrome::NOTIFICATION_EXTENSION_SPEECH_INPUT_RECORDING_STOPPED, 767 chrome::NOTIFICATION_EXTENSION_SPEECH_INPUT_RECORDING_STOPPED,
767 // Guarded by the state_ == kShutdown check. 768 // Guarded by the state_ == kShutdown check.
768 content::Source<Profile>(profile_), 769 content::Source<Profile>(profile_),
769 content::Details<std::string>(&extension_id)); 770 content::Details<std::string>(&extension_id));
770 } 771 }
771 772
772 void SpeechInputExtensionManager::OnAudioLevelsChange(int session_id, 773 void SpeechInputExtensionManager::OnAudioLevelsChange(int session_id,
773 float volume, 774 float volume,
774 float noise_volume) {} 775 float noise_volume) {}
OLDNEW
« no previous file with comments | « chrome/browser/file_select_helper.h ('k') | chrome/browser/task_manager/task_manager_resource_providers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698