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

Side by Side Diff: Source/modules/battery/BatteryManager.h

Issue 1163253003: Clean up macros around DEFINE_EVENT_TARGET_REFCOUNTING (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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
« no previous file with comments | « Source/core/timing/Performance.h ('k') | Source/modules/encryptedmedia/MediaKeySession.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 BatteryManager_h 5 #ifndef BatteryManager_h
6 #define BatteryManager_h 6 #define BatteryManager_h
7 7
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptPromiseResolver.h" 9 #include "bindings/core/v8/ScriptPromiseResolver.h"
10 #include "core/dom/ContextLifecycleObserver.h" 10 #include "core/dom/ContextLifecycleObserver.h"
11 #include "core/frame/PlatformEventController.h" 11 #include "core/frame/PlatformEventController.h"
12 #include "modules/EventTargetModules.h" 12 #include "modules/EventTargetModules.h"
13 #include "platform/heap/Handle.h" 13 #include "platform/heap/Handle.h"
14 14
15 namespace blink { 15 namespace blink {
16 16
17 class BatteryStatus; 17 class BatteryStatus;
18 18
19 class BatteryManager final : public RefCountedGarbageCollectedEventTargetWithInl ineData<BatteryManager>, public ActiveDOMObject, public PlatformEventController { 19 class BatteryManager final : public RefCountedGarbageCollectedEventTargetWithInl ineData<BatteryManager>, public ActiveDOMObject, public PlatformEventController {
20 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<B atteryManager>); 20 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(BatteryManager);
21 DEFINE_WRAPPERTYPEINFO(); 21 DEFINE_WRAPPERTYPEINFO();
22 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(BatteryManager); 22 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(BatteryManager);
23 public: 23 public:
24 static BatteryManager* create(ExecutionContext*); 24 static BatteryManager* create(ExecutionContext*);
25 virtual ~BatteryManager(); 25 virtual ~BatteryManager();
26 26
27 // Returns a promise object that will be resolved with this BatteryManager. 27 // Returns a promise object that will be resolved with this BatteryManager.
28 ScriptPromise startRequest(ScriptState*); 28 ScriptPromise startRequest(ScriptState*);
29 29
30 // EventTarget implementation. 30 // EventTarget implementation.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 explicit BatteryManager(ExecutionContext*); 65 explicit BatteryManager(ExecutionContext*);
66 66
67 RefPtrWillBeMember<ScriptPromiseResolver> m_resolver; 67 RefPtrWillBeMember<ScriptPromiseResolver> m_resolver;
68 Member<BatteryStatus> m_batteryStatus; 68 Member<BatteryStatus> m_batteryStatus;
69 State m_state; 69 State m_state;
70 }; 70 };
71 71
72 } // namespace blink 72 } // namespace blink
73 73
74 #endif // BatteryManager_h 74 #endif // BatteryManager_h
OLDNEW
« no previous file with comments | « Source/core/timing/Performance.h ('k') | Source/modules/encryptedmedia/MediaKeySession.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698