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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 // ContextLifecycleObserver: | 44 // ContextLifecycleObserver: |
45 void contextDestroyed() override; | 45 void contextDestroyed() override; |
46 | 46 |
47 DECLARE_VIRTUAL_TRACE(); | 47 DECLARE_VIRTUAL_TRACE(); |
48 | 48 |
49 private: | 49 private: |
50 BroadcastChannel(ExecutionContext*, const String& name); | 50 BroadcastChannel(ExecutionContext*, const String& name); |
51 | 51 |
52 // mojom::blink::BroadcastChannelClient: | 52 // mojom::blink::BroadcastChannelClient: |
53 void OnMessage(const String& message) override; | 53 void OnMessage(mojo::WTFArray<uint8_t> message) override; |
54 | 54 |
55 // Called when the mojo binding disconnects. | 55 // Called when the mojo binding disconnects. |
56 void onError(); | 56 void onError(); |
57 | 57 |
58 RefPtr<SecurityOrigin> m_origin; | 58 RefPtr<SecurityOrigin> m_origin; |
59 String m_name; | 59 String m_name; |
60 | 60 |
61 mojo::AssociatedBinding<mojom::blink::BroadcastChannelClient> m_binding; | 61 mojo::AssociatedBinding<mojom::blink::BroadcastChannelClient> m_binding; |
62 mojom::blink::BroadcastChannelClientAssociatedPtr m_remoteClient; | 62 mojom::blink::BroadcastChannelClientAssociatedPtr m_remoteClient; |
63 }; | 63 }; |
64 | 64 |
65 } // namespace blink | 65 } // namespace blink |
66 | 66 |
67 #endif // BroadcastChannel_h | 67 #endif // BroadcastChannel_h |
OLD | NEW |