OLD | NEW |
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 PermissionStatus_h | 5 #ifndef PermissionStatus_h |
6 #define PermissionStatus_h | 6 #define PermissionStatus_h |
7 | 7 |
8 #include "bindings/core/v8/ActiveScriptWrappable.h" | 8 #include "bindings/core/v8/ActiveScriptWrappable.h" |
9 #include "core/dom/ActiveDOMObject.h" | 9 #include "core/dom/ActiveDOMObject.h" |
10 #include "core/events/EventTarget.h" | 10 #include "core/events/EventTarget.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // EventTarget implementation. | 42 // EventTarget implementation. |
43 const AtomicString& interfaceName() const override; | 43 const AtomicString& interfaceName() const override; |
44 ExecutionContext* getExecutionContext() const override; | 44 ExecutionContext* getExecutionContext() const override; |
45 | 45 |
46 // ScriptWrappable implementation. | 46 // ScriptWrappable implementation. |
47 bool hasPendingActivity() const final; | 47 bool hasPendingActivity() const final; |
48 | 48 |
49 // ActiveDOMObject implementation. | 49 // ActiveDOMObject implementation. |
50 void suspend() override; | 50 void suspend() override; |
51 void resume() override; | 51 void resume() override; |
52 void stop() override; | 52 void contextDestroyed() override; |
53 | 53 |
54 String state() const; | 54 String state() const; |
55 void permissionChanged(MojoPermissionStatus); | 55 void permissionChanged(MojoPermissionStatus); |
56 | 56 |
57 DEFINE_ATTRIBUTE_EVENT_LISTENER(change); | 57 DEFINE_ATTRIBUTE_EVENT_LISTENER(change); |
58 | 58 |
59 DECLARE_VIRTUAL_TRACE(); | 59 DECLARE_VIRTUAL_TRACE(); |
60 | 60 |
61 private: | 61 private: |
62 PermissionStatus(ExecutionContext*, | 62 PermissionStatus(ExecutionContext*, |
63 MojoPermissionStatus, | 63 MojoPermissionStatus, |
64 MojoPermissionDescriptor); | 64 MojoPermissionDescriptor); |
65 | 65 |
66 void startListening(); | 66 void startListening(); |
67 void stopListening(); | 67 void stopListening(); |
68 | 68 |
69 MojoPermissionStatus m_status; | 69 MojoPermissionStatus m_status; |
70 MojoPermissionDescriptor m_descriptor; | 70 MojoPermissionDescriptor m_descriptor; |
71 mojom::blink::PermissionServicePtr m_service; | 71 mojom::blink::PermissionServicePtr m_service; |
72 }; | 72 }; |
73 | 73 |
74 } // namespace blink | 74 } // namespace blink |
75 | 75 |
76 #endif // PermissionStatus_h | 76 #endif // PermissionStatus_h |
OLD | NEW |