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

Side by Side Diff: components/copresence/handlers/audio/audio_directive_handler_impl.cc

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 years, 2 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 | « components/copresence/copresence_manager_impl.cc ('k') | components/copresence/timed_map.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 "components/copresence/handlers/audio/audio_directive_handler_impl.h" 5 #include "components/copresence/handlers/audio/audio_directive_handler_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 } // namespace 49 } // namespace
50 50
51 51
52 // Public functions. 52 // Public functions.
53 53
54 AudioDirectiveHandlerImpl::AudioDirectiveHandlerImpl( 54 AudioDirectiveHandlerImpl::AudioDirectiveHandlerImpl(
55 const DirectivesCallback& update_directives_callback) 55 const DirectivesCallback& update_directives_callback)
56 : update_directives_callback_(update_directives_callback), 56 : update_directives_callback_(update_directives_callback),
57 audio_modem_(audio_modem::Modem::Create()), 57 audio_modem_(audio_modem::Modem::Create()),
58 audio_event_timer_(new base::OneShotTimer<AudioDirectiveHandler>), 58 audio_event_timer_(new base::OneShotTimer),
59 clock_(new TickClockRefCounted(new base::DefaultTickClock)) {} 59 clock_(new TickClockRefCounted(new base::DefaultTickClock)) {}
60 60
61 AudioDirectiveHandlerImpl::AudioDirectiveHandlerImpl( 61 AudioDirectiveHandlerImpl::AudioDirectiveHandlerImpl(
62 const DirectivesCallback& update_directives_callback, 62 const DirectivesCallback& update_directives_callback,
63 scoped_ptr<audio_modem::Modem> audio_modem, 63 scoped_ptr<audio_modem::Modem> audio_modem,
64 scoped_ptr<base::Timer> timer, 64 scoped_ptr<base::Timer> timer,
65 const scoped_refptr<TickClockRefCounted>& clock) 65 const scoped_refptr<TickClockRefCounted>& clock)
66 : update_directives_callback_(update_directives_callback), 66 : update_directives_callback_(update_directives_callback),
67 audio_modem_(audio_modem.Pass()), 67 audio_modem_(audio_modem.Pass()),
68 audio_event_timer_(timer.Pass()), 68 audio_event_timer_(timer.Pass()),
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 229
230 *expiry = GetEarliestEventTime(transmits_lists_[AUDIBLE], base::TimeTicks()); 230 *expiry = GetEarliestEventTime(transmits_lists_[AUDIBLE], base::TimeTicks());
231 *expiry = GetEarliestEventTime(transmits_lists_[INAUDIBLE], *expiry); 231 *expiry = GetEarliestEventTime(transmits_lists_[INAUDIBLE], *expiry);
232 *expiry = GetEarliestEventTime(receives_lists_[AUDIBLE], *expiry); 232 *expiry = GetEarliestEventTime(receives_lists_[AUDIBLE], *expiry);
233 *expiry = GetEarliestEventTime(receives_lists_[INAUDIBLE], *expiry); 233 *expiry = GetEarliestEventTime(receives_lists_[INAUDIBLE], *expiry);
234 234
235 return !expiry->is_null(); 235 return !expiry->is_null();
236 } 236 }
237 237
238 } // namespace copresence 238 } // namespace copresence
OLDNEW
« no previous file with comments | « components/copresence/copresence_manager_impl.cc ('k') | components/copresence/timed_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698