| 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 "core/dom/ContextLifecycleObserver.h" | 8 #include "core/dom/ContextLifecycleObserver.h" |
| 9 #include "core/events/EventTarget.h" | 9 #include "core/events/EventTarget.h" |
| 10 #include "mojo/public/cpp/bindings/associated_binding.h" | 10 #include "mojo/public/cpp/bindings/associated_binding.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 const String& name, | 30 const String& name, |
| 31 ExceptionState&); | 31 ExceptionState&); |
| 32 ~BroadcastChannel() override; | 32 ~BroadcastChannel() override; |
| 33 void Dispose(); | 33 void Dispose(); |
| 34 | 34 |
| 35 // IDL | 35 // IDL |
| 36 String name() const { return name_; } | 36 String name() const { return name_; } |
| 37 void postMessage(const ScriptValue&, ExceptionState&); | 37 void postMessage(const ScriptValue&, ExceptionState&); |
| 38 void close(); | 38 void close(); |
| 39 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); | 39 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); |
| 40 DEFINE_ATTRIBUTE_EVENT_LISTENER(messageerror); |
| 40 | 41 |
| 41 // EventTarget: | 42 // EventTarget: |
| 42 const AtomicString& InterfaceName() const override; | 43 const AtomicString& InterfaceName() const override; |
| 43 ExecutionContext* GetExecutionContext() const override { | 44 ExecutionContext* GetExecutionContext() const override { |
| 44 return ContextLifecycleObserver::GetExecutionContext(); | 45 return ContextLifecycleObserver::GetExecutionContext(); |
| 45 } | 46 } |
| 46 | 47 |
| 47 // ScriptWrappable: | 48 // ScriptWrappable: |
| 48 bool HasPendingActivity() const override; | 49 bool HasPendingActivity() const override; |
| 49 | 50 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 64 RefPtr<SecurityOrigin> origin_; | 65 RefPtr<SecurityOrigin> origin_; |
| 65 String name_; | 66 String name_; |
| 66 | 67 |
| 67 mojo::AssociatedBinding<mojom::blink::BroadcastChannelClient> binding_; | 68 mojo::AssociatedBinding<mojom::blink::BroadcastChannelClient> binding_; |
| 68 mojom::blink::BroadcastChannelClientAssociatedPtr remote_client_; | 69 mojom::blink::BroadcastChannelClientAssociatedPtr remote_client_; |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 } // namespace blink | 72 } // namespace blink |
| 72 | 73 |
| 73 #endif // BroadcastChannel_h | 74 #endif // BroadcastChannel_h |
| OLD | NEW |