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

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

Issue 2125633003: Adding UMA to record whether Pepper players have ever played sound (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit 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
« no previous file with comments | « no previous file | content/browser/media/session/pepper_playback_observer.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 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 #ifndef CONTENT_BROWSER_MEDIA_SESSION_PEPPER_PLAYBACK_OBSERVER_H_ 5 #ifndef CONTENT_BROWSER_MEDIA_SESSION_PEPPER_PLAYBACK_OBSERVER_H_
6 #define CONTENT_BROWSER_MEDIA_SESSION_PEPPER_PLAYBACK_OBSERVER_H_ 6 #define CONTENT_BROWSER_MEDIA_SESSION_PEPPER_PLAYBACK_OBSERVER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 17 matching lines...) Expand all
28 void PepperInstanceDeleted(int32_t pp_instance); 28 void PepperInstanceDeleted(int32_t pp_instance);
29 void PepperStartsPlayback(int32_t pp_instance); 29 void PepperStartsPlayback(int32_t pp_instance);
30 void PepperStopsPlayback(int32_t pp_instance); 30 void PepperStopsPlayback(int32_t pp_instance);
31 31
32 private: 32 private:
33 // Owning PepperPlayerDelegates. 33 // Owning PepperPlayerDelegates.
34 using PlayersMap = 34 using PlayersMap =
35 std::map<int32_t, std::unique_ptr<PepperPlayerDelegate>>; 35 std::map<int32_t, std::unique_ptr<PepperPlayerDelegate>>;
36 PlayersMap players_map_; 36 PlayersMap players_map_;
37 37
38 // Map for whether Pepper players have ever played sound.
39 // Used for recording UMA.
40 using PlayersPlayedSoundMap =
41 std::map<int32_t, bool>;
42 PlayersPlayedSoundMap players_played_sound_map_;
43
38 // Weak reference to WebContents. 44 // Weak reference to WebContents.
39 WebContentsImpl* contents_; 45 WebContentsImpl* contents_;
40 46
41 DISALLOW_COPY_AND_ASSIGN(PepperPlaybackObserver); 47 DISALLOW_COPY_AND_ASSIGN(PepperPlaybackObserver);
42 }; 48 };
43 49
44 } // namespace content 50 } // namespace content
45 51
46 #endif // CONTENT_BROWSER_MEDIA_SESSION_PEPPER_PLAYBACK_OBSERVER_H_ 52 #endif // CONTENT_BROWSER_MEDIA_SESSION_PEPPER_PLAYBACK_OBSERVER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/media/session/pepper_playback_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698