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

Side by Side Diff: Source/WebKit/chromium/public/WebSpeechInputResult.h

Issue 15271012: Clean up WebDOMEvent ownership of WebCore::Event. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: A couple more fixes Created 7 years, 7 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 27 matching lines...) Expand all
38 namespace WebKit { 38 namespace WebKit {
39 39
40 // This class holds one speech recognition result including the text and other r elated 40 // This class holds one speech recognition result including the text and other r elated
41 // fields, as received from the embedder. 41 // fields, as received from the embedder.
42 class WebSpeechInputResult { 42 class WebSpeechInputResult {
43 public: 43 public:
44 WebSpeechInputResult() { } 44 WebSpeechInputResult() { }
45 WebSpeechInputResult(const WebSpeechInputResult& other) { assign(other); } 45 WebSpeechInputResult(const WebSpeechInputResult& other) { assign(other); }
46 ~WebSpeechInputResult() { reset(); } 46 ~WebSpeechInputResult() { reset(); }
47 47
48 WebSpeechInputResult& operator=(const WebSpeechInputResult& other)
49 {
50 assign(other);
51 return *this;
52 }
dmichael (off chromium) 2013/05/22 17:00:28 The compiler-provided assignment was being used in
53
48 WEBKIT_EXPORT void assign(const WebString& utterance, double confidence); 54 WEBKIT_EXPORT void assign(const WebString& utterance, double confidence);
49 WEBKIT_EXPORT void assign(const WebSpeechInputResult& other); 55 WEBKIT_EXPORT void assign(const WebSpeechInputResult& other);
50 WEBKIT_EXPORT void reset(); 56 WEBKIT_EXPORT void reset();
51 57
52 #if WEBKIT_IMPLEMENTATION 58 #if WEBKIT_IMPLEMENTATION
53 WebSpeechInputResult(const WTF::PassRefPtr<WebCore::SpeechInputResult>&); 59 WebSpeechInputResult(const WTF::PassRefPtr<WebCore::SpeechInputResult>&);
54 operator WTF::PassRefPtr<WebCore::SpeechInputResult>() const; 60 operator WTF::PassRefPtr<WebCore::SpeechInputResult>() const;
55 #endif 61 #endif
56 62
57 private: 63 private:
58 WebPrivatePtr<WebCore::SpeechInputResult> m_private; 64 WebPrivatePtr<WebCore::SpeechInputResult> m_private;
59 }; 65 };
60 66
61 typedef WebVector<WebSpeechInputResult> WebSpeechInputResultArray; 67 typedef WebVector<WebSpeechInputResult> WebSpeechInputResultArray;
62 68
63 } // namespace WebKit 69 } // namespace WebKit
64 70
65 #endif // WebSpeechInputResult_h 71 #endif // WebSpeechInputResult_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698