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

Unified Diff: third_party/WebKit/Source/modules/mediasession/NavigatorMediaSession.h

Issue 2401013002: Make MediaSession per frame as an attribute of Navigator (Closed)
Patch Set: fixed tests Created 4 years, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/mediasession/NavigatorMediaSession.h
diff --git a/third_party/WebKit/Source/modules/mediasession/NavigatorMediaSession.h b/third_party/WebKit/Source/modules/mediasession/NavigatorMediaSession.h
new file mode 100644
index 0000000000000000000000000000000000000000..e7656a1e877a0094337bfa73faad61580b982c52
--- /dev/null
+++ b/third_party/WebKit/Source/modules/mediasession/NavigatorMediaSession.h
@@ -0,0 +1,37 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NavigatorMediaSession_h
+#define NavigatorMediaSession_h
+
+#include "core/frame/DOMWindowProperty.h"
mlamouri (slow - plz ping) 2016/10/10 20:30:35 Do you need this include?
Zhiqiang Zhang (Slow) 2016/10/11 10:56:04 Removed.
+#include "core/frame/Navigator.h"
+#include "modules/mediasession/MediaSession.h"
+#include "platform/Supplementable.h"
+
+namespace blink {
+
+class Navigator;
+
+class NavigatorMediaSession final
whywhat 2016/10/10 20:45:10 nit: don't forget to write comments to new classes
Zhiqiang Zhang (Slow) 2016/10/11 10:56:04 Done.
+ : public GarbageCollected<NavigatorMediaSession>,
+ public Supplement<Navigator> {
+ USING_GARBAGE_COLLECTED_MIXIN(NavigatorMediaSession);
+
+ public:
+ static NavigatorMediaSession& from(Navigator&);
+ static MediaSession* mediaSession(Navigator&);
+
+ DECLARE_TRACE();
+
+ private:
+ NavigatorMediaSession(Navigator&);
+ static const char* supplementName();
+
+ Member<MediaSession> m_session;
+};
+
+} // namespace blink
+
+#endif // NavigatorMediaSession_h

Powered by Google App Engine
This is Rietveld 408576698