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

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

Issue 2393513004: Convert app banners to use Mojo. (Closed)
Patch Set: Add TODO Created 4 years, 1 month 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 #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"
10 #include "wtf/Noncopyable.h" 9 #include "wtf/Noncopyable.h"
11 #include "wtf/text/WTFString.h" 10 #include "wtf/text/WTFString.h"
12 11
13 namespace blink { 12 namespace blink {
14 13
15 class ScriptPromiseResolver;
16
17 class AppBannerPromptResult final 14 class AppBannerPromptResult final
18 : public GarbageCollectedFinalized<AppBannerPromptResult>, 15 : public GarbageCollectedFinalized<AppBannerPromptResult>,
19 public ScriptWrappable { 16 public ScriptWrappable {
20 DEFINE_WRAPPERTYPEINFO(); 17 DEFINE_WRAPPERTYPEINFO();
21 WTF_MAKE_NONCOPYABLE(AppBannerPromptResult); 18 WTF_MAKE_NONCOPYABLE(AppBannerPromptResult);
22 19
23 public: 20 public:
24 static AppBannerPromptResult* create( 21 enum class Outcome { Accepted, Dismissed };
25 const AtomicString& platform, 22
26 WebAppBannerPromptResult::Outcome outcome) { 23 static AppBannerPromptResult* create(const String& platform,
24 Outcome outcome) {
27 return new AppBannerPromptResult(platform, outcome); 25 return new AppBannerPromptResult(platform, outcome);
28 } 26 }
29 27
30 virtual ~AppBannerPromptResult(); 28 virtual ~AppBannerPromptResult();
31 29
32 String platform() const { return m_platform; } 30 String platform() const { return m_platform; }
33 String outcome() const; 31 String outcome() const;
34 32
35 DEFINE_INLINE_VIRTUAL_TRACE() {} 33 DEFINE_INLINE_VIRTUAL_TRACE() {}
36 34
37 private: 35 private:
38 AppBannerPromptResult(const AtomicString& platform, 36 AppBannerPromptResult(const String& platform, Outcome);
39 WebAppBannerPromptResult::Outcome);
40 37
41 String m_platform; 38 String m_platform;
42 WebAppBannerPromptResult::Outcome m_outcome; 39 Outcome m_outcome;
43 }; 40 };
44 41
45 } // namespace blink 42 } // namespace blink
46 43
47 #endif // AppBannerPromptResult_h 44 #endif // AppBannerPromptResult_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698