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

Side by Side Diff: Source/modules/speech/SpeechRecognitionEvent.h

Issue 169343002: [WIP]Add WebPrivateHeapPtr and use it for speech platform layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * * Redistributions of source code must retain the above copyright 7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright 9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 unsigned long resultIndex; 45 unsigned long resultIndex;
46 RefPtrWillBeRawPtr<SpeechRecognitionResultList> results; 46 RefPtrWillBeRawPtr<SpeechRecognitionResultList> results;
47 }; 47 };
48 48
49 class SpeechRecognitionEvent FINAL : public Event { 49 class SpeechRecognitionEvent FINAL : public Event {
50 public: 50 public:
51 static PassRefPtr<SpeechRecognitionEvent> create(); 51 static PassRefPtr<SpeechRecognitionEvent> create();
52 static PassRefPtr<SpeechRecognitionEvent> create(const AtomicString&, const SpeechRecognitionEventInit&); 52 static PassRefPtr<SpeechRecognitionEvent> create(const AtomicString&, const SpeechRecognitionEventInit&);
53 virtual ~SpeechRecognitionEvent(); 53 virtual ~SpeechRecognitionEvent();
54 54
55 static PassRefPtr<SpeechRecognitionEvent> createResult(unsigned long resultI ndex, const Vector<RefPtr<SpeechRecognitionResult> >& results); 55 static PassRefPtr<SpeechRecognitionEvent> createResult(unsigned long resultI ndex, const WillBeHeapVector<RefPtrWillBeMember<SpeechRecognitionResult> >& resu lts);
56 static PassRefPtr<SpeechRecognitionEvent> createNoMatch(PassRefPtr<SpeechRec ognitionResult>); 56 static PassRefPtr<SpeechRecognitionEvent> createNoMatch(PassRefPtrWillBeRawP tr<SpeechRecognitionResult>);
57 57
58 unsigned long resultIndex() const { return m_resultIndex; } 58 unsigned long resultIndex() const { return m_resultIndex; }
59 SpeechRecognitionResultList* results() const { return m_results.get(); } 59 SpeechRecognitionResultList* results() const { return m_results.get(); }
60 60
61 // These two methods are here to satisfy the specification which requires th ese attrubutes to exist. 61 // These two methods are here to satisfy the specification which requires th ese attrubutes to exist.
62 Document* interpretation() { return 0; } 62 Document* interpretation() { return 0; }
63 Document* emma() { return 0; } 63 Document* emma() { return 0; }
64 64
65 // Event 65 // Event
66 virtual const AtomicString& interfaceName() const OVERRIDE; 66 virtual const AtomicString& interfaceName() const OVERRIDE;
67 67
68 private: 68 private:
69 SpeechRecognitionEvent(); 69 SpeechRecognitionEvent();
70 SpeechRecognitionEvent(const AtomicString&, const SpeechRecognitionEventInit &); 70 SpeechRecognitionEvent(const AtomicString&, const SpeechRecognitionEventInit &);
71 SpeechRecognitionEvent(const AtomicString& eventName, unsigned long resultIn dex, PassRefPtrWillBeRawPtr<SpeechRecognitionResultList> results); 71 SpeechRecognitionEvent(const AtomicString& eventName, unsigned long resultIn dex, PassRefPtrWillBeRawPtr<SpeechRecognitionResultList> results);
72 72
73 unsigned long m_resultIndex; 73 unsigned long m_resultIndex;
74 RefPtrWillBePersistent<SpeechRecognitionResultList> m_results; 74 RefPtrWillBePersistent<SpeechRecognitionResultList> m_results;
75 }; 75 };
76 76
77 } // namespace WebCore 77 } // namespace WebCore
78 78
79 #endif // SpeechRecognitionEvent_h 79 #endif // SpeechRecognitionEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698