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

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

Issue 2589663003: mojo:: Rename mojo::GetProxy() to mojo::MakeRequest() (Closed)
Patch Set: Rebase 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 #include "modules/mediasession/MediaSession.h" 5 #include "modules/mediasession/MediaSession.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/dom/DocumentUserGestureToken.h" 8 #include "core/dom/DocumentUserGestureToken.h"
9 #include "core/dom/ExecutionContext.h" 9 #include "core/dom/ExecutionContext.h"
10 #include "core/events/Event.h" 10 #include "core/events/Event.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 DCHECK(getExecutionContext()->isDocument()) 157 DCHECK(getExecutionContext()->isDocument())
158 << "MediaSession::getService() is only available from a frame"; 158 << "MediaSession::getService() is only available from a frame";
159 Document* document = toDocument(getExecutionContext()); 159 Document* document = toDocument(getExecutionContext());
160 if (!document->frame()) 160 if (!document->frame())
161 return nullptr; 161 return nullptr;
162 162
163 InterfaceProvider* interfaceProvider = document->frame()->interfaceProvider(); 163 InterfaceProvider* interfaceProvider = document->frame()->interfaceProvider();
164 if (!interfaceProvider) 164 if (!interfaceProvider)
165 return nullptr; 165 return nullptr;
166 166
167 interfaceProvider->getInterface(mojo::GetProxy(&m_service)); 167 interfaceProvider->getInterface(mojo::MakeRequest(&m_service));
168 if (m_service.get()) 168 if (m_service.get())
169 m_service->SetClient(m_clientBinding.CreateInterfacePtrAndBind()); 169 m_service->SetClient(m_clientBinding.CreateInterfacePtrAndBind());
170 170
171 return m_service.get(); 171 return m_service.get();
172 } 172 }
173 173
174 bool MediaSession::addEventListenerInternal( 174 bool MediaSession::addEventListenerInternal(
175 const AtomicString& eventType, 175 const AtomicString& eventType,
176 EventListener* listener, 176 EventListener* listener,
177 const AddEventListenerOptionsResolved& options) { 177 const AddEventListenerOptionsResolved& options) {
(...skipping 26 matching lines...) Expand all
204 dispatchEvent(Event::create(mojomActionToEventName(action))); 204 dispatchEvent(Event::create(mojomActionToEventName(action)));
205 } 205 }
206 206
207 DEFINE_TRACE(MediaSession) { 207 DEFINE_TRACE(MediaSession) {
208 visitor->trace(m_metadata); 208 visitor->trace(m_metadata);
209 EventTargetWithInlineData::trace(visitor); 209 EventTargetWithInlineData::trace(visitor);
210 ContextLifecycleObserver::trace(visitor); 210 ContextLifecycleObserver::trace(visitor);
211 } 211 }
212 212
213 } // namespace blink 213 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp ('k') | third_party/WebKit/Source/modules/nfc/NFC.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698