| OLD | NEW |
| 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); | |
| 23 | |
| 24 static AppBannerPromptResult* create(const AtomicString& platform, WebAppBan
nerPromptResult::Outcome outcome) | 22 static AppBannerPromptResult* create(const AtomicString& platform, WebAppBan
nerPromptResult::Outcome outcome) |
| 25 { | 23 { |
| 26 return new AppBannerPromptResult(platform, outcome); | 24 return new AppBannerPromptResult(platform, outcome); |
| 27 } | 25 } |
| 28 | 26 |
| 29 virtual ~AppBannerPromptResult(); | 27 virtual ~AppBannerPromptResult(); |
| 30 | 28 |
| 31 String platform() const { return m_platform; } | 29 String platform() const { return m_platform; } |
| 32 String outcome() const; | 30 String outcome() const; |
| 33 | 31 |
| 34 DEFINE_INLINE_VIRTUAL_TRACE() { } | 32 DEFINE_INLINE_VIRTUAL_TRACE() { } |
| 35 | 33 |
| 36 private: | 34 private: |
| 37 AppBannerPromptResult(const AtomicString& platform, WebAppBannerPromptResult
::Outcome); | 35 AppBannerPromptResult(const AtomicString& platform, WebAppBannerPromptResult
::Outcome); |
| 38 | 36 |
| 39 String m_platform; | 37 String m_platform; |
| 40 WebAppBannerPromptResult::Outcome m_outcome; | 38 WebAppBannerPromptResult::Outcome m_outcome; |
| 41 }; | 39 }; |
| 42 | 40 |
| 43 } // namespace blink | 41 } // namespace blink |
| 44 | 42 |
| 45 #endif // AppBannerPromptResult_h | 43 #endif // AppBannerPromptResult_h |
| OLD | NEW |