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

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

Issue 2545893003: Remove RefPtr<ScriptState> from MediaSession (Closed)
Patch Set: temp 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
« no previous file with comments | « third_party/WebKit/Source/modules/mediasession/MediaSession.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ExceptionStatePlaceholder.h" 7 #include "bindings/core/v8/ExceptionStatePlaceholder.h"
8 #include "modules/mediasession/MediaSession.h" 8 #include "modules/mediasession/MediaSession.h"
9 #include "platform/Supplementable.h" 9 #include "platform/Supplementable.h"
10 10
(...skipping 17 matching lines...) Expand all
28 supplement = new NavigatorMediaSession(navigator); 28 supplement = new NavigatorMediaSession(navigator);
29 provideTo(navigator, supplementName(), supplement); 29 provideTo(navigator, supplementName(), supplement);
30 } 30 }
31 return *supplement; 31 return *supplement;
32 } 32 }
33 33
34 MediaSession* NavigatorMediaSession::mediaSession(ScriptState* scriptState, 34 MediaSession* NavigatorMediaSession::mediaSession(ScriptState* scriptState,
35 Navigator& navigator) { 35 Navigator& navigator) {
36 NavigatorMediaSession& self = NavigatorMediaSession::from(navigator); 36 NavigatorMediaSession& self = NavigatorMediaSession::from(navigator);
37 if (!self.m_session) 37 if (!self.m_session)
38 self.m_session = MediaSession::create(scriptState); 38 self.m_session = MediaSession::create(scriptState->getExecutionContext());
39 return self.m_session.get(); 39 return self.m_session.get();
40 } 40 }
41 41
42 } // namespace blink 42 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/mediasession/MediaSession.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698