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

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

Issue 10626007: Move ExtensionSystem into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Master merge; moved class declaration 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 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 246
247 void SpeechInputExtensionManager::ResetToIdleState() { 247 void SpeechInputExtensionManager::ResetToIdleState() {
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 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 ExtensionHost* eh = epm->GetBackgroundHostForExtension(extension_id);
259 DCHECK(eh); 259 DCHECK(eh);
260 content::RenderProcessHost* rph = eh->render_process_host(); 260 content::RenderProcessHost* rph = eh->render_process_host();
261 DCHECK(rph); 261 DCHECK(rph);
262 return rph->GetID(); 262 return rph->GetID();
263 } 263 }
264 264
265 void SpeechInputExtensionManager::OnRecognitionResult( 265 void SpeechInputExtensionManager::OnRecognitionResult(
266 int session_id, 266 int session_id,
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 content::NotificationService::current()->Notify( 765 content::NotificationService::current()->Notify(
766 chrome::NOTIFICATION_EXTENSION_SPEECH_INPUT_RECORDING_STOPPED, 766 chrome::NOTIFICATION_EXTENSION_SPEECH_INPUT_RECORDING_STOPPED,
767 // Guarded by the state_ == kShutdown check. 767 // Guarded by the state_ == kShutdown check.
768 content::Source<Profile>(profile_), 768 content::Source<Profile>(profile_),
769 content::Details<std::string>(&extension_id)); 769 content::Details<std::string>(&extension_id));
770 } 770 }
771 771
772 void SpeechInputExtensionManager::OnAudioLevelsChange(int session_id, 772 void SpeechInputExtensionManager::OnAudioLevelsChange(int session_id,
773 float volume, 773 float volume,
774 float noise_volume) {} 774 float noise_volume) {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698