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

Side by Side Diff: media/midi/midi_manager_winrt.cc

Issue 2885063003: Remove ScopedComPtr::QueryFrom() (Closed)
Patch Set: Created 3 years, 7 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
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 #include "media/midi/midi_manager_winrt.h" 5 #include "media/midi/midi_manager_winrt.h"
6 6
7 #pragma warning(disable : 4467) 7 #pragma warning(disable : 4467)
8 8
9 #include <initguid.h> // Required by <devpkey.h> 9 #include <initguid.h> // Required by <devpkey.h>
10 10
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 if (FAILED(hr)) { 223 if (FAILED(hr)) {
224 VLOG(1) << "get_Name failed: " << PrintHr(hr); 224 VLOG(1) << "get_Name failed: " << PrintHr(hr);
225 return std::string(); 225 return std::string();
226 } 226 }
227 return HStringToString(result); 227 return HStringToString(result);
228 } 228 }
229 229
230 HRESULT GetPointerToBufferData(IBuffer* buffer, uint8_t** out) { 230 HRESULT GetPointerToBufferData(IBuffer* buffer, uint8_t** out) {
231 ScopedComPtr<Windows::Storage::Streams::IBufferByteAccess> buffer_byte_access; 231 ScopedComPtr<Windows::Storage::Streams::IBufferByteAccess> buffer_byte_access;
232 232
233 HRESULT hr = buffer_byte_access.QueryFrom(buffer); 233 HRESULT hr = buffer->QueryInterface(IID_PPV_ARGS(&buffer_byte_access));
234 if (FAILED(hr)) { 234 if (FAILED(hr)) {
235 VLOG(1) << "QueryInterface failed: " << PrintHr(hr); 235 VLOG(1) << "QueryInterface failed: " << PrintHr(hr);
236 return hr; 236 return hr;
237 } 237 }
238 238
239 // Lifetime of the pointing buffer is controlled by the buffer object. 239 // Lifetime of the pointing buffer is controlled by the buffer object.
240 hr = buffer_byte_access->Buffer(out); 240 hr = buffer_byte_access->Buffer(out);
241 if (FAILED(hr)) { 241 if (FAILED(hr)) {
242 VLOG(1) << "Buffer failed: " << PrintHr(hr); 242 VLOG(1) << "Buffer failed: " << PrintHr(hr);
243 return hr; 243 return hr;
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 1042
1043 void MidiManagerWinrt::OnPortManagerReady() { 1043 void MidiManagerWinrt::OnPortManagerReady() {
1044 DCHECK(com_thread_checker_->CalledOnValidThread()); 1044 DCHECK(com_thread_checker_->CalledOnValidThread());
1045 DCHECK(port_manager_ready_count_ < 2); 1045 DCHECK(port_manager_ready_count_ < 2);
1046 1046
1047 if (++port_manager_ready_count_ == 2) 1047 if (++port_manager_ready_count_ == 2)
1048 CompleteInitialization(Result::OK); 1048 CompleteInitialization(Result::OK);
1049 } 1049 }
1050 1050
1051 } // namespace midi 1051 } // namespace midi
OLDNEW
« no previous file with comments | « media/gpu/dxva_video_decode_accelerator_win.cc ('k') | ui/accessibility/platform/ax_platform_node_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698