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

Unified Diff: Source/modules/speech/SpeechRecognitionController.cpp

Issue 899853002: Merge 188868 "Revert of Make SpeechRecognitionController per fra..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/2272/
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/speech/SpeechRecognitionController.h ('k') | Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/speech/SpeechRecognitionController.cpp
===================================================================
--- Source/modules/speech/SpeechRecognitionController.cpp (revision 189482)
+++ Source/modules/speech/SpeechRecognitionController.cpp (working copy)
@@ -28,17 +28,6 @@
namespace blink {
-void SpeechRecognitionController::provideTo(LocalFrame& frame, PassOwnPtr<SpeechRecognitionClient> client)
-{
- SpeechRecognitionController* controller = new SpeechRecognitionController(client);
- WillBeHeapSupplement<LocalFrame>::provideTo(frame, SpeechRecognitionController::supplementName(), adoptPtrWillBeNoop(controller));
-}
-
-SpeechRecognitionController* SpeechRecognitionController::from(LocalFrame& frame)
-{
- return static_cast<SpeechRecognitionController*>(WillBeHeapSupplement<LocalFrame>::from(frame, supplementName()));
-}
-
const char* SpeechRecognitionController::supplementName()
{
return "SpeechRecognitionController";
@@ -54,9 +43,14 @@
// FIXME: Call m_client->pageDestroyed(); once we have implemented a client.
}
-void SpeechRecognitionController::trace(Visitor* visitor)
+PassOwnPtrWillBeRawPtr<SpeechRecognitionController> SpeechRecognitionController::create(PassOwnPtr<SpeechRecognitionClient> client)
{
- WillBeHeapSupplement<LocalFrame>::trace(visitor);
+ return adoptPtrWillBeNoop(new SpeechRecognitionController(client));
}
+void provideSpeechRecognitionTo(Page& page, PassOwnPtr<SpeechRecognitionClient> client)
+{
+ SpeechRecognitionController::provideTo(page, SpeechRecognitionController::supplementName(), SpeechRecognitionController::create(client));
+}
+
} // namespace blink
« no previous file with comments | « Source/modules/speech/SpeechRecognitionController.h ('k') | Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698