| 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/SuspendableObject.h" | 9 #include "core/dom/SuspendableObject.h" |
| 10 #include "core/events/EventTarget.h" | 10 #include "core/events/EventTarget.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 // EventTarget implementation. | 46 // EventTarget implementation. |
| 47 const AtomicString& interfaceName() const override; | 47 const AtomicString& interfaceName() const override; |
| 48 ExecutionContext* getExecutionContext() const override; | 48 ExecutionContext* getExecutionContext() const override; |
| 49 | 49 |
| 50 // ScriptWrappable implementation. | 50 // ScriptWrappable implementation. |
| 51 bool hasPendingActivity() const final; | 51 bool hasPendingActivity() const final; |
| 52 | 52 |
| 53 // SuspendableObject implementation. | 53 // SuspendableObject implementation. |
| 54 void suspend() override; | 54 void suspend() override; |
| 55 void resume() override; | 55 void resume() override; |
| 56 void contextDestroyed() override; | 56 void contextDestroyed(ExecutionContext*) override; |
| 57 | 57 |
| 58 String state() const; | 58 String state() const; |
| 59 | 59 |
| 60 DEFINE_ATTRIBUTE_EVENT_LISTENER(change); | 60 DEFINE_ATTRIBUTE_EVENT_LISTENER(change); |
| 61 | 61 |
| 62 DECLARE_VIRTUAL_TRACE(); | 62 DECLARE_VIRTUAL_TRACE(); |
| 63 | 63 |
| 64 private: | 64 private: |
| 65 PermissionStatus(ExecutionContext*, | 65 PermissionStatus(ExecutionContext*, |
| 66 MojoPermissionStatus, | 66 MojoPermissionStatus, |
| 67 MojoPermissionDescriptor); | 67 MojoPermissionDescriptor); |
| 68 | 68 |
| 69 void startListening(); | 69 void startListening(); |
| 70 void stopListening(); | 70 void stopListening(); |
| 71 | 71 |
| 72 void OnPermissionStatusChange(MojoPermissionStatus); | 72 void OnPermissionStatusChange(MojoPermissionStatus); |
| 73 | 73 |
| 74 MojoPermissionStatus m_status; | 74 MojoPermissionStatus m_status; |
| 75 MojoPermissionDescriptor m_descriptor; | 75 MojoPermissionDescriptor m_descriptor; |
| 76 mojo::Binding<mojom::blink::PermissionObserver> m_binding; | 76 mojo::Binding<mojom::blink::PermissionObserver> m_binding; |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 } // namespace blink | 79 } // namespace blink |
| 80 | 80 |
| 81 #endif // PermissionStatus_h | 81 #endif // PermissionStatus_h |
| OLD | NEW |