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

Side by Side Diff: Source/modules/presentation/AvailableChangeEvent.h

Issue 1222623003: Presentation API: implement .getAvalability() (Blink side). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix tests 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
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/presentation/AvailableChangeEvent.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef AvailableChangeEvent_h
6 #define AvailableChangeEvent_h
7
8 #include "modules/EventModules.h"
9 #include "modules/presentation/AvailableChangeEventInit.h"
10 #include "platform/heap/Handle.h"
11
12 namespace blink {
13
14 // AvailableChangeEvent object definition corresponding to the event IDL from th e Presentation API,
15 // see https://w3c.github.io/presentation-api/#availablechangeevent for details.
16 class AvailableChangeEvent final : public Event {
17 DEFINE_WRAPPERTYPEINFO();
18 public:
19 virtual ~AvailableChangeEvent();
20
21 static PassRefPtrWillBeRawPtr<AvailableChangeEvent> create()
22 {
23 return adoptRefWillBeNoop(new AvailableChangeEvent);
24 }
25 static PassRefPtrWillBeRawPtr<AvailableChangeEvent> create(const AtomicStrin g& eventType, bool available)
26 {
27 return adoptRefWillBeNoop(new AvailableChangeEvent(eventType, available) );
28 }
29 static PassRefPtrWillBeRawPtr<AvailableChangeEvent> create(const AtomicStrin g& eventType, const AvailableChangeEventInit& initializer)
30 {
31 return adoptRefWillBeNoop(new AvailableChangeEvent(eventType, initialize r));
32 }
33
34 bool available() const { return m_available; }
35
36 virtual const AtomicString& interfaceName() const override;
37
38 private:
39 AvailableChangeEvent();
40 AvailableChangeEvent(const AtomicString& eventType, bool available);
41 AvailableChangeEvent(const AtomicString& eventType, const AvailableChangeEve ntInit& initializer);
42
43 bool m_available;
44 };
45
46 DEFINE_TYPE_CASTS(AvailableChangeEvent, Event, event, event->interfaceName() == EventNames::AvailableChangeEvent, event.interfaceName() == EventNames::Available ChangeEvent);
47
48 } // namespace blink
49
50 #endif // AvailableChangeEvent_h
OLDNEW
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/presentation/AvailableChangeEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698