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

Side by Side Diff: public/web/WebSpeechRecognitionHandle.h

Issue 623953002: Avoid some explicit WebSpeechRecognitionHandle() conversions. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Tidy vector element assignments of SpeechRecognitionResults Created 6 years, 2 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 BLINK_EXPORT void reset(); 53 BLINK_EXPORT void reset();
54 BLINK_EXPORT void assign(const WebSpeechRecognitionHandle&); 54 BLINK_EXPORT void assign(const WebSpeechRecognitionHandle&);
55 55
56 // Comparison functions are provided so that WebSpeechRecognitionHandle obje cts 56 // Comparison functions are provided so that WebSpeechRecognitionHandle obje cts
57 // can be stored in a hash map. 57 // can be stored in a hash map.
58 BLINK_EXPORT bool equals(const WebSpeechRecognitionHandle&) const; 58 BLINK_EXPORT bool equals(const WebSpeechRecognitionHandle&) const;
59 BLINK_EXPORT bool lessThan(const WebSpeechRecognitionHandle&) const; 59 BLINK_EXPORT bool lessThan(const WebSpeechRecognitionHandle&) const;
60 60
61 #if BLINK_IMPLEMENTATION 61 #if BLINK_IMPLEMENTATION
62 explicit WebSpeechRecognitionHandle(SpeechRecognition*); 62 WebSpeechRecognitionHandle(SpeechRecognition*);
63 WebSpeechRecognitionHandle& operator=(SpeechRecognition*);
64 operator SpeechRecognition*() const; 63 operator SpeechRecognition*() const;
65 #endif 64 #endif
66 65
67 private: 66 private:
68 WebPrivatePtr<SpeechRecognition> m_private; 67 WebPrivatePtr<SpeechRecognition> m_private;
69 }; 68 };
70 69
71 inline bool operator==(const WebSpeechRecognitionHandle& a, const WebSpeechRecog nitionHandle& b) 70 inline bool operator==(const WebSpeechRecognitionHandle& a, const WebSpeechRecog nitionHandle& b)
72 { 71 {
73 return a.equals(b); 72 return a.equals(b);
74 } 73 }
75 74
76 inline bool operator!=(const WebSpeechRecognitionHandle& a, const WebSpeechRecog nitionHandle& b) 75 inline bool operator!=(const WebSpeechRecognitionHandle& a, const WebSpeechRecog nitionHandle& b)
77 { 76 {
78 return !(a == b); 77 return !(a == b);
79 } 78 }
80 79
81 inline bool operator<(const WebSpeechRecognitionHandle& a, const WebSpeechRecogn itionHandle& b) 80 inline bool operator<(const WebSpeechRecognitionHandle& a, const WebSpeechRecogn itionHandle& b)
82 { 81 {
83 return a.lessThan(b); 82 return a.lessThan(b);
84 } 83 }
85 84
86 } // namespace blink 85 } // namespace blink
87 86
88 #endif // WebSpeechRecognitionHandle_h 87 #endif // WebSpeechRecognitionHandle_h
OLDNEW
« Source/web/SpeechRecognitionClientProxy.cpp ('K') | « public/web/WebSpeechGrammar.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698