| 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 state() const; |
| 51 String status() const; | 52 String status() const; |
| 52 | 53 |
| 53 DEFINE_ATTRIBUTE_EVENT_LISTENER(change); | 54 DEFINE_ATTRIBUTE_EVENT_LISTENER(change); |
| 54 | 55 |
| 55 DECLARE_VIRTUAL_TRACE(); | 56 DECLARE_VIRTUAL_TRACE(); |
| 56 | 57 |
| 57 private: | 58 private: |
| 58 PermissionStatus(ExecutionContext*, WebPermissionStatus, WebPermissionType); | 59 PermissionStatus(ExecutionContext*, WebPermissionStatus, WebPermissionType); |
| 59 | 60 |
| 60 void startListening(); | 61 void startListening(); |
| 61 void stopListening(); | 62 void stopListening(); |
| 62 | 63 |
| 63 WebPermissionStatus m_status; | 64 WebPermissionStatus m_status; |
| 64 WebPermissionType m_type; | 65 WebPermissionType m_type; |
| 65 bool m_listening; | 66 bool m_listening; |
| 66 }; | 67 }; |
| 67 | 68 |
| 68 } // namespace blink | 69 } // namespace blink |
| 69 | 70 |
| 70 #endif // PermissionStatus_h | 71 #endif // PermissionStatus_h |
| OLD | NEW |