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

Side by Side Diff: content/browser/media/session/media_session_impl.h

Issue 2715723002: Fix a crash in MediaSessionServiceImpl due to life time issue (Closed)
Patch Set: addressed nits Created 3 years, 10 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
« no previous file with comments | « no previous file | content/browser/media/session/media_session_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_IMPL_H_ 5 #ifndef CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_IMPL_H_
6 #define CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_IMPL_H_ 6 #define CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 // session requests audio focus. 159 // session requests audio focus.
160 CONTENT_EXPORT AudioFocusManager::AudioFocusType audio_focus_type() const { 160 CONTENT_EXPORT AudioFocusManager::AudioFocusType audio_focus_type() const {
161 return audio_focus_type_; 161 return audio_focus_type_;
162 } 162 }
163 163
164 // Returns whether the session has Pepper instances. 164 // Returns whether the session has Pepper instances.
165 bool HasPepper() const; 165 bool HasPepper() const;
166 166
167 // WebContentsObserver implementation 167 // WebContentsObserver implementation
168 void WebContentsDestroyed() override; 168 void WebContentsDestroyed() override;
169 void RenderFrameDeleted(RenderFrameHost* rfh) override;
169 170
170 // MediaSessionService-related methods 171 // MediaSessionService-related methods
171 172
172 // Called when a MediaSessionService is created, which registers itself to 173 // Called when a MediaSessionService is created, which registers itself to
173 // this session. 174 // this session.
174 void OnServiceCreated(MediaSessionServiceImpl* service); 175 void OnServiceCreated(MediaSessionServiceImpl* service);
175 // Called when a MediaSessionService is destroyed, which unregisters itself 176 // Called when a MediaSessionService is destroyed, which unregisters itself
176 // from this session. 177 // from this session.
177 void OnServiceDestroyed(MediaSessionServiceImpl* service); 178 void OnServiceDestroyed(MediaSessionServiceImpl* service);
178 179
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 ServicesMap services_; 312 ServicesMap services_;
312 // The currently routed service (non-owned pointer). 313 // The currently routed service (non-owned pointer).
313 MediaSessionServiceImpl* routed_service_; 314 MediaSessionServiceImpl* routed_service_;
314 315
315 DISALLOW_COPY_AND_ASSIGN(MediaSessionImpl); 316 DISALLOW_COPY_AND_ASSIGN(MediaSessionImpl);
316 }; 317 };
317 318
318 } // namespace content 319 } // namespace content
319 320
320 #endif // CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_IMPL_H_ 321 #endif // CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/media/session/media_session_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698