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

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

Issue 2842833003: Update SupportsUserData uses with unique_ptr. (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 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // WebContents can only have one audio focus at a time, it will be Content in 60 // WebContents can only have one audio focus at a time, it will be Content in
61 // case of Transient and Content audio focus are both requested. 61 // case of Transient and Content audio focus are both requested.
62 // TODO(thakis,mlamouri): MediaSessionImpl isn't CONTENT_EXPORT'd because it 62 // TODO(thakis,mlamouri): MediaSessionImpl isn't CONTENT_EXPORT'd because it
63 // creates complicated build issues with WebContentsUserData being a 63 // creates complicated build issues with WebContentsUserData being a
64 // non-exported template, see https://crbug.com/589840. As a result, the class 64 // non-exported template, see https://crbug.com/589840. As a result, the class
65 // uses CONTENT_EXPORT for methods that are being used from tests. 65 // uses CONTENT_EXPORT for methods that are being used from tests.
66 // CONTENT_EXPORT should be moved back to the class when the Windows build will 66 // CONTENT_EXPORT should be moved back to the class when the Windows build will
67 // work with it. 67 // work with it.
68 class MediaSessionImpl : public MediaSession, 68 class MediaSessionImpl : public MediaSession,
69 public WebContentsObserver, 69 public WebContentsObserver,
70 protected WebContentsUserData<MediaSessionImpl> { 70 public WebContentsUserData<MediaSessionImpl> {
71 public: 71 public:
72 enum class State { ACTIVE, SUSPENDED, INACTIVE }; 72 enum class State { ACTIVE, SUSPENDED, INACTIVE };
73 73
74 // Returns the MediaSessionImpl associated to this WebContents. Creates one if 74 // Returns the MediaSessionImpl associated to this WebContents. Creates one if
75 // none is currently available. 75 // none is currently available.
76 CONTENT_EXPORT static MediaSessionImpl* Get(WebContents* web_contents); 76 CONTENT_EXPORT static MediaSessionImpl* Get(WebContents* web_contents);
77 77
78 ~MediaSessionImpl() override; 78 ~MediaSessionImpl() override;
79 79
80 #if defined(OS_ANDROID) 80 #if defined(OS_ANDROID)
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 ServicesMap services_; 313 ServicesMap services_;
314 // The currently routed service (non-owned pointer). 314 // The currently routed service (non-owned pointer).
315 MediaSessionServiceImpl* routed_service_; 315 MediaSessionServiceImpl* routed_service_;
316 316
317 DISALLOW_COPY_AND_ASSIGN(MediaSessionImpl); 317 DISALLOW_COPY_AND_ASSIGN(MediaSessionImpl);
318 }; 318 };
319 319
320 } // namespace content 320 } // namespace content
321 321
322 #endif // CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_IMPL_H_ 322 #endif // CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_unittest.cc ('k') | content/browser/media/session/media_session_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698