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 #include "config.h" | 5 #include "config.h" |
6 #include "modules/app_banner/AppBannerPromptResult.h" | 6 #include "modules/app_banner/AppBannerPromptResult.h" |
7 | 7 |
8 #include "public/platform/modules/app_banner/WebAppBannerPromptResult.h" | 8 #include "public/platform/modules/app_banner/WebAppBannerPromptResult.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
11 | 11 |
12 // static | 12 // static |
13 AppBannerPromptResult* AppBannerPromptResult::take(ScriptPromiseResolver* resolv er, PassOwnPtr<WebAppBannerPromptResult> webInstance) | 13 AppBannerPromptResult* AppBannerPromptResult::take(ScriptPromiseResolver* resolv er, PassOwnPtr<WebAppBannerPromptResult> webInstance) |
14 { | 14 { |
15 return AppBannerPromptResult::take(webInstance); | |
16 } | |
17 | |
18 // static | |
19 AppBannerPromptResult* AppBannerPromptResult::take(PassOwnPtr<WebAppBannerPrompt Result> webInstance) | |
mlamouri (slow - plz ping)
2015/07/24 15:08:25
ditto, shouldn't you remove the other take method?
dominickn
2015/07/24 23:53:36
Done.
| |
20 { | |
15 return webInstance ? AppBannerPromptResult::create(webInstance->platform, we bInstance->outcome) : nullptr; | 21 return webInstance ? AppBannerPromptResult::create(webInstance->platform, we bInstance->outcome) : nullptr; |
16 } | 22 } |
17 | 23 |
18 AppBannerPromptResult::~AppBannerPromptResult() | 24 AppBannerPromptResult::~AppBannerPromptResult() |
19 { | 25 { |
20 } | 26 } |
21 | 27 |
22 String AppBannerPromptResult::outcome() const | 28 String AppBannerPromptResult::outcome() const |
23 { | 29 { |
24 switch (m_outcome) { | 30 switch (m_outcome) { |
25 case WebAppBannerPromptResult::Outcome::Accepted: | 31 case WebAppBannerPromptResult::Outcome::Accepted: |
26 return "accepted"; | 32 return "accepted"; |
27 | 33 |
28 case WebAppBannerPromptResult::Outcome::Dismissed: | 34 case WebAppBannerPromptResult::Outcome::Dismissed: |
29 return "dismissed"; | 35 return "dismissed"; |
30 } | 36 } |
31 | 37 |
32 ASSERT_NOT_REACHED(); | 38 ASSERT_NOT_REACHED(); |
33 return ""; | 39 return ""; |
34 } | 40 } |
35 | 41 |
36 AppBannerPromptResult::AppBannerPromptResult(const AtomicString& platform, WebAp pBannerPromptResult::Outcome outcome) | 42 AppBannerPromptResult::AppBannerPromptResult(const AtomicString& platform, WebAp pBannerPromptResult::Outcome outcome) |
37 : m_platform(platform) | 43 : m_platform(platform) |
38 , m_outcome(outcome) | 44 , m_outcome(outcome) |
39 { | 45 { |
40 } | 46 } |
41 | 47 |
42 } // namespace blink | 48 } // namespace blink |
OLD | NEW |