Chromium Code Reviews| 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 // Support for CallbackPromiseAdapter: | 22 // Support for CallbackPromiseAdapter: |
| 23 typedef blink::WebAppBannerPromptResult WebType; | 23 typedef blink::WebAppBannerPromptResult WebType; |
| 24 static AppBannerPromptResult* take(ScriptPromiseResolver*, PassOwnPtr<WebApp BannerPromptResult> webInstance); | 24 static AppBannerPromptResult* take(ScriptPromiseResolver*, PassOwnPtr<WebApp BannerPromptResult> webInstance); |
| 25 | 25 |
| 26 static AppBannerPromptResult* take(PassOwnPtr<WebAppBannerPromptResult> webI nstance); | |
|
mlamouri (slow - plz ping)
2015/07/24 15:08:25
Do you need to keep the other take method? Same fo
dominickn
2015/07/24 23:53:36
Done.
| |
| 27 | |
| 26 static AppBannerPromptResult* create(const AtomicString& platform, WebAppBan nerPromptResult::Outcome outcome) | 28 static AppBannerPromptResult* create(const AtomicString& platform, WebAppBan nerPromptResult::Outcome outcome) |
| 27 { | 29 { |
| 28 return new AppBannerPromptResult(platform, outcome); | 30 return new AppBannerPromptResult(platform, outcome); |
| 29 } | 31 } |
| 30 | 32 |
| 31 virtual ~AppBannerPromptResult(); | 33 virtual ~AppBannerPromptResult(); |
| 32 | 34 |
| 33 String platform() const { return m_platform; } | 35 String platform() const { return m_platform; } |
| 34 String outcome() const; | 36 String outcome() const; |
| 35 | 37 |
| 36 DEFINE_INLINE_VIRTUAL_TRACE() { } | 38 DEFINE_INLINE_VIRTUAL_TRACE() { } |
| 37 | 39 |
| 38 private: | 40 private: |
| 39 AppBannerPromptResult(const AtomicString& platform, WebAppBannerPromptResult ::Outcome); | 41 AppBannerPromptResult(const AtomicString& platform, WebAppBannerPromptResult ::Outcome); |
| 40 | 42 |
| 41 String m_platform; | 43 String m_platform; |
| 42 WebAppBannerPromptResult::Outcome m_outcome; | 44 WebAppBannerPromptResult::Outcome m_outcome; |
| 43 }; | 45 }; |
| 44 | 46 |
| 45 } // namespace blink | 47 } // namespace blink |
| 46 | 48 |
| 47 #endif // AppBannerPromptResult_h | 49 #endif // AppBannerPromptResult_h |
| OLD | NEW |