Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: third_party/WebKit/Source/modules/mediasession/MediaSession.h

Issue 2584703002: Media Session API: make MediaMetadata mutable. (Closed)
Patch Set: review comments and tests Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 MediaSession_h 5 #ifndef MediaSession_h
6 #define MediaSession_h 6 #define MediaSession_h
7 7
8 #include "bindings/core/v8/ScriptWrappable.h" 8 #include "bindings/core/v8/ScriptWrappable.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 21 matching lines...) Expand all
32 32
33 void dispose(); 33 void dispose();
34 34
35 void setMetadata(MediaMetadata*); 35 void setMetadata(MediaMetadata*);
36 MediaMetadata* metadata() const; 36 MediaMetadata* metadata() const;
37 37
38 // EventTarget implementation. 38 // EventTarget implementation.
39 const WTF::AtomicString& interfaceName() const override; 39 const WTF::AtomicString& interfaceName() const override;
40 ExecutionContext* getExecutionContext() const override; 40 ExecutionContext* getExecutionContext() const override;
41 41
42 // Called by the MediaMetadata owned by |this| when it has updates. Also used
43 // internally when a new MediaMetadata object is set.
44 void onMetadataChanged();
45
42 DEFINE_ATTRIBUTE_EVENT_LISTENER(play); 46 DEFINE_ATTRIBUTE_EVENT_LISTENER(play);
43 DEFINE_ATTRIBUTE_EVENT_LISTENER(pause); 47 DEFINE_ATTRIBUTE_EVENT_LISTENER(pause);
44 DEFINE_ATTRIBUTE_EVENT_LISTENER(playpause); 48 DEFINE_ATTRIBUTE_EVENT_LISTENER(playpause);
45 DEFINE_ATTRIBUTE_EVENT_LISTENER(previoustrack); 49 DEFINE_ATTRIBUTE_EVENT_LISTENER(previoustrack);
46 DEFINE_ATTRIBUTE_EVENT_LISTENER(nexttrack); 50 DEFINE_ATTRIBUTE_EVENT_LISTENER(nexttrack);
47 DEFINE_ATTRIBUTE_EVENT_LISTENER(seekforward); 51 DEFINE_ATTRIBUTE_EVENT_LISTENER(seekforward);
48 DEFINE_ATTRIBUTE_EVENT_LISTENER(seekbackward); 52 DEFINE_ATTRIBUTE_EVENT_LISTENER(seekbackward);
49 53
50 DECLARE_VIRTUAL_TRACE(); 54 DECLARE_VIRTUAL_TRACE();
51 55
(...skipping 18 matching lines...) Expand all
70 mojom::blink::MediaSessionService* getService(); 74 mojom::blink::MediaSessionService* getService();
71 75
72 Member<MediaMetadata> m_metadata; 76 Member<MediaMetadata> m_metadata;
73 mojom::blink::MediaSessionServicePtr m_service; 77 mojom::blink::MediaSessionServicePtr m_service;
74 mojo::Binding<blink::mojom::blink::MediaSessionClient> m_clientBinding; 78 mojo::Binding<blink::mojom::blink::MediaSessionClient> m_clientBinding;
75 }; 79 };
76 80
77 } // namespace blink 81 } // namespace blink
78 82
79 #endif // MediaSession_h 83 #endif // MediaSession_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698