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

Side by Side Diff: media/audio/audio_output_device.cc

Issue 1544313002: Convert Pass()→std::move() in //media (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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/audio/audio_input_device.cc ('k') | media/audio/sounds/audio_stream_handler.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/audio/audio_output_device.h" 5 #include "media/audio/audio_output_device.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <utility>
9 10
10 #include "base/callback_helpers.h" 11 #include "base/callback_helpers.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/threading/thread_restrictions.h" 13 #include "base/threading/thread_restrictions.h"
13 #include "base/time/time.h" 14 #include "base/time/time.h"
14 #include "base/trace_event/trace_event.h" 15 #include "base/trace_event/trace_event.h"
15 #include "build/build_config.h" 16 #include "build/build_config.h"
16 #include "media/audio/audio_output_controller.h" 17 #include "media/audio/audio_output_controller.h"
17 #include "media/base/limits.h" 18 #include "media/base/limits.h"
18 19
(...skipping 25 matching lines...) Expand all
44 }; 45 };
45 46
46 AudioOutputDevice::AudioOutputDevice( 47 AudioOutputDevice::AudioOutputDevice(
47 scoped_ptr<AudioOutputIPC> ipc, 48 scoped_ptr<AudioOutputIPC> ipc,
48 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner, 49 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner,
49 int session_id, 50 int session_id,
50 const std::string& device_id, 51 const std::string& device_id,
51 const url::Origin& security_origin) 52 const url::Origin& security_origin)
52 : ScopedTaskRunnerObserver(io_task_runner), 53 : ScopedTaskRunnerObserver(io_task_runner),
53 callback_(NULL), 54 callback_(NULL),
54 ipc_(ipc.Pass()), 55 ipc_(std::move(ipc)),
55 state_(IDLE), 56 state_(IDLE),
56 start_on_authorized_(false), 57 start_on_authorized_(false),
57 play_on_start_(true), 58 play_on_start_(true),
58 session_id_(session_id), 59 session_id_(session_id),
59 device_id_(device_id), 60 device_id_(device_id),
60 security_origin_(security_origin), 61 security_origin_(security_origin),
61 stopping_hack_(false), 62 stopping_hack_(false),
62 did_receive_auth_(true, false), 63 did_receive_auth_(true, false),
63 device_status_(OUTPUT_DEVICE_STATUS_ERROR_INTERNAL) { 64 device_status_(OUTPUT_DEVICE_STATUS_ERROR_INTERNAL) {
64 CHECK(ipc_); 65 CHECK(ipc_);
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 435
435 // Update the audio-delay measurement, inform about the number of skipped 436 // Update the audio-delay measurement, inform about the number of skipped
436 // frames, and ask client to render audio. Since |output_bus_| is wrapping 437 // frames, and ask client to render audio. Since |output_bus_| is wrapping
437 // the shared memory the Render() call is writing directly into the shared 438 // the shared memory the Render() call is writing directly into the shared
438 // memory. 439 // memory.
439 render_callback_->Render(output_bus_.get(), audio_delay_milliseconds, 440 render_callback_->Render(output_bus_.get(), audio_delay_milliseconds,
440 frames_skipped); 441 frames_skipped);
441 } 442 }
442 443
443 } // namespace media 444 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/audio_input_device.cc ('k') | media/audio/sounds/audio_stream_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698