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

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

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/SpeechRecognition.cpp ('k') | Source/modules/speech/SpeechRecognitionController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/speech/SpeechRecognitionController.h
===================================================================
--- Source/modules/speech/SpeechRecognitionController.h (revision 189482)
+++ Source/modules/speech/SpeechRecognitionController.h (working copy)
@@ -34,9 +34,7 @@
class MediaStreamTrack;
-class SpeechRecognitionController final
- : public NoBaseWillBeGarbageCollectedFinalized<SpeechRecognitionController>
- , public WillBeHeapSupplement<LocalFrame> {
+class SpeechRecognitionController final : public NoBaseWillBeGarbageCollectedFinalized<SpeechRecognitionController>, public WillBeHeapSupplement<Page> {
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SpeechRecognitionController);
public:
virtual ~SpeechRecognitionController();
@@ -49,11 +47,11 @@
void stop(SpeechRecognition* recognition) { m_client->stop(recognition); }
void abort(SpeechRecognition* recognition) { m_client->abort(recognition); }
+ static PassOwnPtrWillBeRawPtr<SpeechRecognitionController> create(PassOwnPtr<SpeechRecognitionClient>);
static const char* supplementName();
- static void provideTo(LocalFrame&, PassOwnPtr<SpeechRecognitionClient>);
- static SpeechRecognitionController* from(LocalFrame&);
+ static SpeechRecognitionController* from(Page* page) { return static_cast<SpeechRecognitionController*>(WillBeHeapSupplement<Page>::from(page, supplementName())); }
- void trace(Visitor*) override;
+ void trace(Visitor* visitor) override { WillBeHeapSupplement<Page>::trace(visitor); }
private:
explicit SpeechRecognitionController(PassOwnPtr<SpeechRecognitionClient>);
« no previous file with comments | « Source/modules/speech/SpeechRecognition.cpp ('k') | Source/modules/speech/SpeechRecognitionController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698