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

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

Issue 1240763002: CallbackPromiseAdapter types should be more compatible with WebCallbacks (3/3). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 | Annotate | Revision Log
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 #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, const WebAppBannerPromptResult& webInstance)
14 { 14 {
15 return webInstance ? AppBannerPromptResult::create(webInstance->platform, we bInstance->outcome) : nullptr; 15 return AppBannerPromptResult::create(webInstance.platform, webInstance.outco me);
16 } 16 }
17 17
18 AppBannerPromptResult::~AppBannerPromptResult() 18 AppBannerPromptResult::~AppBannerPromptResult()
19 { 19 {
20 } 20 }
21 21
22 String AppBannerPromptResult::outcome() const 22 String AppBannerPromptResult::outcome() const
23 { 23 {
24 switch (m_outcome) { 24 switch (m_outcome) {
25 case WebAppBannerPromptResult::Outcome::Accepted: 25 case WebAppBannerPromptResult::Outcome::Accepted:
26 return "accepted"; 26 return "accepted";
27 27
28 case WebAppBannerPromptResult::Outcome::Dismissed: 28 case WebAppBannerPromptResult::Outcome::Dismissed:
29 return "dismissed"; 29 return "dismissed";
30 } 30 }
31 31
32 ASSERT_NOT_REACHED(); 32 ASSERT_NOT_REACHED();
33 return ""; 33 return "";
34 } 34 }
35 35
36 AppBannerPromptResult::AppBannerPromptResult(const AtomicString& platform, WebAp pBannerPromptResult::Outcome outcome) 36 AppBannerPromptResult::AppBannerPromptResult(const AtomicString& platform, WebAp pBannerPromptResult::Outcome outcome)
37 : m_platform(platform) 37 : m_platform(platform)
38 , m_outcome(outcome) 38 , m_outcome(outcome)
39 { 39 {
40 } 40 }
41 41
42 } // namespace blink 42 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698