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

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

Issue 1483903002: [App Banner] Use appropriate type parameters for WebCallbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 #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
13 AppBannerPromptResult* AppBannerPromptResult::take(PassOwnPtr<WebAppBannerPrompt Result> webInstance)
14 {
15 return webInstance ? AppBannerPromptResult::create(webInstance->platform, we bInstance->outcome) : nullptr;
16 }
17
18 AppBannerPromptResult::~AppBannerPromptResult() 12 AppBannerPromptResult::~AppBannerPromptResult()
19 { 13 {
20 } 14 }
21 15
22 String AppBannerPromptResult::outcome() const 16 String AppBannerPromptResult::outcome() const
23 { 17 {
24 switch (m_outcome) { 18 switch (m_outcome) {
25 case WebAppBannerPromptResult::Outcome::Accepted: 19 case WebAppBannerPromptResult::Outcome::Accepted:
26 return "accepted"; 20 return "accepted";
27 21
28 case WebAppBannerPromptResult::Outcome::Dismissed: 22 case WebAppBannerPromptResult::Outcome::Dismissed:
29 return "dismissed"; 23 return "dismissed";
30 } 24 }
31 25
32 ASSERT_NOT_REACHED(); 26 ASSERT_NOT_REACHED();
33 return ""; 27 return "";
34 } 28 }
35 29
36 AppBannerPromptResult::AppBannerPromptResult(const AtomicString& platform, WebAp pBannerPromptResult::Outcome outcome) 30 AppBannerPromptResult::AppBannerPromptResult(const AtomicString& platform, WebAp pBannerPromptResult::Outcome outcome)
37 : m_platform(platform) 31 : m_platform(platform)
38 , m_outcome(outcome) 32 , m_outcome(outcome)
39 { 33 {
40 } 34 }
41 35
42 } // namespace blink 36 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698