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

Side by Side Diff: Source/modules/audio_output_devices/SetSinkIdCallbacks.h

Issue 1233173002: Have ScriptPromiseResolver on the Oilpan heap always. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix webusb ScriptPromiseResolver usage Created 5 years, 4 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SetSinkIdCallbacks_h 5 #ifndef SetSinkIdCallbacks_h
6 #define SetSinkIdCallbacks_h 6 #define SetSinkIdCallbacks_h
7 7
8 #include "platform/Timer.h" 8 #include "platform/Timer.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 #include "public/platform/WebCallbacks.h" 10 #include "public/platform/WebCallbacks.h"
11 #include "wtf/Noncopyable.h" 11 #include "wtf/Noncopyable.h"
12 #include "wtf/PassRefPtr.h"
13 #include "wtf/RefPtr.h" 12 #include "wtf/RefPtr.h"
14 13
15 namespace blink { 14 namespace blink {
16 15
17 class HTMLMediaElement; 16 class HTMLMediaElement;
18 class ScriptPromiseResolver; 17 class ScriptPromiseResolver;
19 struct WebSetSinkIdError; 18 struct WebSetSinkIdError;
20 19
21 class SetSinkIdCallbacks final : public WebCallbacks<void, WebSetSinkIdError*> { 20 class SetSinkIdCallbacks final : public WebCallbacks<void, WebSetSinkIdError*> {
22 WTF_MAKE_NONCOPYABLE(SetSinkIdCallbacks); 21 WTF_MAKE_NONCOPYABLE(SetSinkIdCallbacks);
23 public: 22 public:
24 SetSinkIdCallbacks(PassRefPtrWillBeRawPtr<ScriptPromiseResolver>, HTMLMediaE lement&, const String& sinkId); 23 SetSinkIdCallbacks(ScriptPromiseResolver*, HTMLMediaElement&, const String& sinkId);
25 ~SetSinkIdCallbacks() override; 24 ~SetSinkIdCallbacks() override;
26 25
27 void onSuccess() override; 26 void onSuccess() override;
28 void onError(WebSetSinkIdError*) override; 27 void onError(WebSetSinkIdError*) override;
29 28
30 private: 29 private:
31 RefPtrWillBePersistent<ScriptPromiseResolver> m_resolver; 30 Persistent<ScriptPromiseResolver> m_resolver;
32 RefPtrWillBePersistent<HTMLMediaElement> m_element; 31 RefPtrWillBePersistent<HTMLMediaElement> m_element;
33 String m_sinkId; 32 String m_sinkId;
34 }; 33 };
35 34
36 } // namespace blink 35 } // namespace blink
37 36
38 #endif // SetSinkIdCallbacks_h 37 #endif // SetSinkIdCallbacks_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698