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

Side by Side Diff: third_party/WebKit/Source/modules/mediasession/NavigatorMediaSession.cpp

Issue 2848243004: Clean up bindings/core/v8 (Part 2) (Closed)
Patch Set: Rebase Created 3 years, 7 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 unified diff | Download patch
OLDNEW
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 #include "modules/mediasession/NavigatorMediaSession.h" 5 #include "modules/mediasession/NavigatorMediaSession.h"
6 6
7 #include "bindings/core/v8/ScriptState.h"
8 #include "core/dom/ExecutionContext.h" 7 #include "core/dom/ExecutionContext.h"
9 #include "modules/mediasession/MediaSession.h" 8 #include "modules/mediasession/MediaSession.h"
10 #include "platform/Supplementable.h" 9 #include "platform/Supplementable.h"
10 #include "platform/bindings/ScriptState.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 NavigatorMediaSession::NavigatorMediaSession(Navigator& navigator) 14 NavigatorMediaSession::NavigatorMediaSession(Navigator& navigator)
15 : Supplement<Navigator>(navigator) {} 15 : Supplement<Navigator>(navigator) {}
16 16
17 DEFINE_TRACE(NavigatorMediaSession) { 17 DEFINE_TRACE(NavigatorMediaSession) {
18 visitor->Trace(session_); 18 visitor->Trace(session_);
19 Supplement<Navigator>::Trace(visitor); 19 Supplement<Navigator>::Trace(visitor);
20 } 20 }
(...skipping 14 matching lines...) Expand all
35 35
36 MediaSession* NavigatorMediaSession::mediaSession(ScriptState* script_state, 36 MediaSession* NavigatorMediaSession::mediaSession(ScriptState* script_state,
37 Navigator& navigator) { 37 Navigator& navigator) {
38 NavigatorMediaSession& self = NavigatorMediaSession::From(navigator); 38 NavigatorMediaSession& self = NavigatorMediaSession::From(navigator);
39 if (!self.session_) 39 if (!self.session_)
40 self.session_ = MediaSession::Create(ExecutionContext::From(script_state)); 40 self.session_ = MediaSession::Create(ExecutionContext::From(script_state));
41 return self.session_.Get(); 41 return self.session_.Get();
42 } 42 }
43 43
44 } // namespace blink 44 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698