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

Side by Side Diff: media/cdm/player_tracker_impl.cc

Issue 1731403002: media: Add out-of-line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « media/cdm/player_tracker_impl.h ('k') | media/filters/gpu_video_decoder.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "media/cdm/player_tracker_impl.h" 5 #include "media/cdm/player_tracker_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 10
11 namespace media { 11 namespace media {
12 12
13 PlayerTrackerImpl::PlayerCallbacks::PlayerCallbacks( 13 PlayerTrackerImpl::PlayerCallbacks::PlayerCallbacks(
14 const base::Closure& new_key_cb, 14 const base::Closure& new_key_cb,
15 const base::Closure& cdm_unset_cb) 15 const base::Closure& cdm_unset_cb)
16 : new_key_cb(new_key_cb), cdm_unset_cb(cdm_unset_cb) {} 16 : new_key_cb(new_key_cb), cdm_unset_cb(cdm_unset_cb) {}
17 17
18 PlayerTrackerImpl::PlayerCallbacks::PlayerCallbacks(
19 const PlayerCallbacks& other) = default;
20
18 PlayerTrackerImpl::PlayerCallbacks::~PlayerCallbacks() { 21 PlayerTrackerImpl::PlayerCallbacks::~PlayerCallbacks() {
19 } 22 }
20 23
21 PlayerTrackerImpl::PlayerTrackerImpl() : next_registration_id_(1) { 24 PlayerTrackerImpl::PlayerTrackerImpl() : next_registration_id_(1) {
22 } 25 }
23 26
24 PlayerTrackerImpl::~PlayerTrackerImpl() {} 27 PlayerTrackerImpl::~PlayerTrackerImpl() {}
25 28
26 int PlayerTrackerImpl::RegisterPlayer(const base::Closure& new_key_cb, 29 int PlayerTrackerImpl::RegisterPlayer(const base::Closure& new_key_cb,
27 const base::Closure& cdm_unset_cb) { 30 const base::Closure& cdm_unset_cb) {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 base::AutoLock lock(lock_); 63 base::AutoLock lock(lock_);
61 for (const auto& entry : player_callbacks_map_) 64 for (const auto& entry : player_callbacks_map_)
62 cdm_unset_callbacks.push_back(entry.second.cdm_unset_cb); 65 cdm_unset_callbacks.push_back(entry.second.cdm_unset_cb);
63 } 66 }
64 67
65 for (const auto& cb : cdm_unset_callbacks) 68 for (const auto& cb : cdm_unset_callbacks)
66 cb.Run(); 69 cb.Run();
67 } 70 }
68 71
69 } // namespace media 72 } // namespace media
OLDNEW
« no previous file with comments | « media/cdm/player_tracker_impl.h ('k') | media/filters/gpu_video_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698