| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 BroadcastChannel_h | 5 #ifndef BroadcastChannel_h |
| 6 #define BroadcastChannel_h | 6 #define BroadcastChannel_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ActiveScriptWrappable.h" | 8 #include "bindings/core/v8/ActiveScriptWrappable.h" |
| 9 #include "core/dom/ContextLifecycleObserver.h" | 9 #include "core/dom/ContextLifecycleObserver.h" |
| 10 #include "core/events/EventTarget.h" | 10 #include "core/events/EventTarget.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 // EventTarget: | 39 // EventTarget: |
| 40 const AtomicString& interfaceName() const override; | 40 const AtomicString& interfaceName() const override; |
| 41 ExecutionContext* getExecutionContext() const override { | 41 ExecutionContext* getExecutionContext() const override { |
| 42 return ContextLifecycleObserver::getExecutionContext(); | 42 return ContextLifecycleObserver::getExecutionContext(); |
| 43 } | 43 } |
| 44 | 44 |
| 45 // ScriptWrappable: | 45 // ScriptWrappable: |
| 46 bool hasPendingActivity() const override; | 46 bool hasPendingActivity() const override; |
| 47 | 47 |
| 48 // ContextLifecycleObserver: | 48 // ContextLifecycleObserver: |
| 49 void contextDestroyed() override; | 49 void contextDestroyed(ExecutionContext*) override; |
| 50 | 50 |
| 51 DECLARE_VIRTUAL_TRACE(); | 51 DECLARE_VIRTUAL_TRACE(); |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 BroadcastChannel(ExecutionContext*, const String& name); | 54 BroadcastChannel(ExecutionContext*, const String& name); |
| 55 | 55 |
| 56 // mojom::blink::BroadcastChannelClient: | 56 // mojom::blink::BroadcastChannelClient: |
| 57 void OnMessage(const WTF::Vector<uint8_t>& message) override; | 57 void OnMessage(const WTF::Vector<uint8_t>& message) override; |
| 58 | 58 |
| 59 // Called when the mojo binding disconnects. | 59 // Called when the mojo binding disconnects. |
| 60 void onError(); | 60 void onError(); |
| 61 | 61 |
| 62 RefPtr<SecurityOrigin> m_origin; | 62 RefPtr<SecurityOrigin> m_origin; |
| 63 String m_name; | 63 String m_name; |
| 64 | 64 |
| 65 mojo::AssociatedBinding<mojom::blink::BroadcastChannelClient> m_binding; | 65 mojo::AssociatedBinding<mojom::blink::BroadcastChannelClient> m_binding; |
| 66 mojom::blink::BroadcastChannelClientAssociatedPtr m_remoteClient; | 66 mojom::blink::BroadcastChannelClientAssociatedPtr m_remoteClient; |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 } // namespace blink | 69 } // namespace blink |
| 70 | 70 |
| 71 #endif // BroadcastChannel_h | 71 #endif // BroadcastChannel_h |
| OLD | NEW |