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

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

Issue 2060933002: Let Flash join and be controlled by media session (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pepper_to_contents
Patch Set: addressed Jochen's comments Created 4 years, 5 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_MEDIA_SESSION_PEPPER_PLAYBACK_OBSERVER_H_
6 #define CONTENT_BROWSER_MEDIA_SESSION_PEPPER_PLAYBACK_OBSERVER_H_
7
8 #include "base/id_map.h"
9 #include "content/public/browser/web_contents_observer.h"
10
11 namespace content {
12
13 class PepperPlayerDelegate;
14
15 // Class observing Pepper playback changes from WebContents, and update
16 // MediaSession accordingly. Can only be a member of WebContentsImpl and must be
17 // destroyed in ~WebContentsImpl().
18 class PepperPlaybackObserver {
19 public:
20 explicit PepperPlaybackObserver(WebContents* contents);
21 virtual ~PepperPlaybackObserver();
22
23 void PepperInstanceCreated(int32_t pp_instance);
24 void PepperInstanceDeleted(int32_t pp_instance);
25 void PepperStartsPlayback(int32_t pp_instance);
26 void PepperStopsPlayback(int32_t pp_instance);
27
28 private:
29 // Owning PepperPlayerDelegates.
30 using PlayersMap =
31 IDMap<PepperPlayerDelegate, IDMapOwnPointer, int32_t>;
32 PlayersMap players_map_;
33
34 // Weak reference to WebContents.
35 WebContents* contents_;
dcheng 2016/06/30 07:02:39 Nit: suggest just making this a WebContentsImpl, t
Zhiqiang Zhang (Slow) 2016/06/30 12:46:54 Done.
36
37 DISALLOW_COPY_AND_ASSIGN(PepperPlaybackObserver);
38 };
39
40 } // namespace content
41
42 #endif // CONTENT_BROWSER_MEDIA_SESSION_PEPPER_PLAYBACK_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698