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

Side by Side Diff: Source/modules/screen_orientation/LockOrientationCallback.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 LockOrientationCallback_h 5 #ifndef LockOrientationCallback_h
6 #define LockOrientationCallback_h 6 #define LockOrientationCallback_h
7 7
8 #include "platform/heap/Handle.h" 8 #include "platform/heap/Handle.h"
9 #include "public/platform/modules/screen_orientation/WebLockOrientationCallback. h" 9 #include "public/platform/modules/screen_orientation/WebLockOrientationCallback. h"
10 #include "public/platform/modules/screen_orientation/WebScreenOrientationType.h" 10 #include "public/platform/modules/screen_orientation/WebScreenOrientationType.h"
11 #include "wtf/Noncopyable.h" 11 #include "wtf/Noncopyable.h"
12 #include "wtf/PassRefPtr.h" 12 #include "wtf/PassRefPtr.h"
13 #include "wtf/RefPtr.h" 13 #include "wtf/RefPtr.h"
14 14
15 namespace blink { 15 namespace blink {
16 16
17 class ScriptPromiseResolver; 17 class ScriptPromiseResolver;
18 18
19 // LockOrientationCallback is an implementation of WebLockOrientationCallback 19 // LockOrientationCallback is an implementation of WebLockOrientationCallback
20 // that will resolve the underlying promise depending on the result passed to 20 // that will resolve the underlying promise depending on the result passed to
21 // the callback. 21 // the callback.
22 class LockOrientationCallback final : public WebLockOrientationCallback { 22 class LockOrientationCallback final : public WebLockOrientationCallback {
23 WTF_MAKE_NONCOPYABLE(LockOrientationCallback); 23 WTF_MAKE_NONCOPYABLE(LockOrientationCallback);
24 public: 24 public:
25 explicit LockOrientationCallback(PassRefPtrWillBeRawPtr<ScriptPromiseResolve r>); 25 explicit LockOrientationCallback(ScriptPromiseResolver*);
26 ~LockOrientationCallback() override; 26 ~LockOrientationCallback() override;
27 27
28 void onSuccess() override; 28 void onSuccess() override;
29 void onError(WebLockOrientationError) override; 29 void onError(WebLockOrientationError) override;
30 30
31 private: 31 private:
32 RefPtrWillBePersistent<ScriptPromiseResolver> m_resolver; 32 Persistent<ScriptPromiseResolver> m_resolver;
33 }; 33 };
34 34
35 } // namespace blink 35 } // namespace blink
36 36
37 #endif // LockOrientationCallback_h 37 #endif // LockOrientationCallback_h
OLDNEW
« no previous file with comments | « Source/modules/quota/StorageQuotaCallbacksImpl.cpp ('k') | Source/modules/screen_orientation/LockOrientationCallback.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698