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 "core/dom/ActiveDOMObject.h" | 8 #include "core/dom/ActiveDOMObject.h" |
9 #include "core/events/EventTarget.h" | 9 #include "core/events/EventTarget.h" |
10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 | 41 |
42 // WebPermissionObserver implementation. | 42 // WebPermissionObserver implementation. |
43 void permissionChanged(WebPermissionType, WebPermissionStatus) override; | 43 void permissionChanged(WebPermissionType, WebPermissionStatus) override; |
44 | 44 |
45 // ActiveDOMObject implementation. | 45 // ActiveDOMObject implementation. |
46 bool hasPendingActivity() const override; | 46 bool hasPendingActivity() const override; |
47 void suspend() override; | 47 void suspend() override; |
48 void resume() override; | 48 void resume() override; |
49 void stop() override; | 49 void stop() override; |
50 | 50 |
51 String status() const; | 51 String state() const; |
52 | 52 |
53 DEFINE_ATTRIBUTE_EVENT_LISTENER(change); | 53 DEFINE_ATTRIBUTE_EVENT_LISTENER(change); |
54 | 54 |
55 DECLARE_VIRTUAL_TRACE(); | 55 DECLARE_VIRTUAL_TRACE(); |
56 | 56 |
57 private: | 57 private: |
58 PermissionStatus(ExecutionContext*, WebPermissionStatus, WebPermissionType); | 58 PermissionStatus(ExecutionContext*, WebPermissionStatus, WebPermissionType); |
59 | 59 |
60 void startListening(); | 60 void startListening(); |
61 void stopListening(); | 61 void stopListening(); |
62 | 62 |
63 WebPermissionStatus m_status; | 63 WebPermissionStatus m_status; |
64 WebPermissionType m_type; | 64 WebPermissionType m_type; |
65 bool m_listening; | 65 bool m_listening; |
66 }; | 66 }; |
67 | 67 |
68 } // namespace blink | 68 } // namespace blink |
69 | 69 |
70 #endif // PermissionStatus_h | 70 #endif // PermissionStatus_h |
OLD | NEW |