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

Side by Side Diff: Source/modules/app_banner/AppBannerPromptResult.h

Issue 1257823003: Revert of Refactor BeforeInstallPromptEvent to use ScriptPromiseProperty (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 AppBannerPromptResult_h 5 #ifndef AppBannerPromptResult_h
6 #define AppBannerPromptResult_h 6 #define AppBannerPromptResult_h
7 7
8 #include "bindings/core/v8/ScriptWrappable.h" 8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "public/platform/modules/app_banner/WebAppBannerPromptResult.h" 9 #include "public/platform/modules/app_banner/WebAppBannerPromptResult.h"
10 #include "wtf/Noncopyable.h" 10 #include "wtf/Noncopyable.h"
11 #include "wtf/PassOwnPtr.h" 11 #include "wtf/PassOwnPtr.h"
12 #include "wtf/text/WTFString.h" 12 #include "wtf/text/WTFString.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class ScriptPromiseResolver; 16 class ScriptPromiseResolver;
17 17
18 class AppBannerPromptResult final : public GarbageCollectedFinalized<AppBannerPr omptResult>, public ScriptWrappable { 18 class AppBannerPromptResult final : public GarbageCollectedFinalized<AppBannerPr omptResult>, public ScriptWrappable {
19 DEFINE_WRAPPERTYPEINFO(); 19 DEFINE_WRAPPERTYPEINFO();
20 WTF_MAKE_NONCOPYABLE(AppBannerPromptResult); 20 WTF_MAKE_NONCOPYABLE(AppBannerPromptResult);
21 public: 21 public:
22 static AppBannerPromptResult* take(PassOwnPtr<WebAppBannerPromptResult> webI nstance); 22 // Support for CallbackPromiseAdapter:
23 typedef blink::WebAppBannerPromptResult WebType;
24 static AppBannerPromptResult* take(ScriptPromiseResolver*, PassOwnPtr<WebApp BannerPromptResult> webInstance);
23 25
24 static AppBannerPromptResult* create(const AtomicString& platform, WebAppBan nerPromptResult::Outcome outcome) 26 static AppBannerPromptResult* create(const AtomicString& platform, WebAppBan nerPromptResult::Outcome outcome)
25 { 27 {
26 return new AppBannerPromptResult(platform, outcome); 28 return new AppBannerPromptResult(platform, outcome);
27 } 29 }
28 30
29 virtual ~AppBannerPromptResult(); 31 virtual ~AppBannerPromptResult();
30 32
31 String platform() const { return m_platform; } 33 String platform() const { return m_platform; }
32 String outcome() const; 34 String outcome() const;
33 35
34 DEFINE_INLINE_VIRTUAL_TRACE() { } 36 DEFINE_INLINE_VIRTUAL_TRACE() { }
35 37
36 private: 38 private:
37 AppBannerPromptResult(const AtomicString& platform, WebAppBannerPromptResult ::Outcome); 39 AppBannerPromptResult(const AtomicString& platform, WebAppBannerPromptResult ::Outcome);
38 40
39 String m_platform; 41 String m_platform;
40 WebAppBannerPromptResult::Outcome m_outcome; 42 WebAppBannerPromptResult::Outcome m_outcome;
41 }; 43 };
42 44
43 } // namespace blink 45 } // namespace blink
44 46
45 #endif // AppBannerPromptResult_h 47 #endif // AppBannerPromptResult_h
OLDNEW
« no previous file with comments | « Source/modules/app_banner/AppBannerController.cpp ('k') | Source/modules/app_banner/AppBannerPromptResult.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698