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

Side by Side Diff: Source/web/WebMediaDevicesRequest.cpp

Issue 173363002: Move mediastream module to oilpan transition types (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added Finalized Created 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 23 matching lines...) Expand all
34 #include "platform/weborigin/SecurityOrigin.h" 34 #include "platform/weborigin/SecurityOrigin.h"
35 #include "public/platform/WebMediaDeviceInfo.h" 35 #include "public/platform/WebMediaDeviceInfo.h"
36 #include "public/platform/WebString.h" 36 #include "public/platform/WebString.h"
37 #include "public/platform/WebVector.h" 37 #include "public/platform/WebVector.h"
38 #include "wtf/Vector.h" 38 #include "wtf/Vector.h"
39 39
40 using namespace WebCore; 40 using namespace WebCore;
41 41
42 namespace blink { 42 namespace blink {
43 43
44 WebMediaDevicesRequest::WebMediaDevicesRequest(const PassRefPtr<MediaDevicesRequ est>& request) 44 WebMediaDevicesRequest::WebMediaDevicesRequest(const PassRefPtrWillBeRawPtr<Medi aDevicesRequest>& request)
45 : m_private(request) 45 : m_private(request)
46 { 46 {
47 } 47 }
48 48
49 WebMediaDevicesRequest::WebMediaDevicesRequest(MediaDevicesRequest* request) 49 WebMediaDevicesRequest::WebMediaDevicesRequest(MediaDevicesRequest* request)
50 : m_private(request) 50 : m_private(request)
51 { 51 {
52 } 52 }
53 53
54 void WebMediaDevicesRequest::reset() 54 void WebMediaDevicesRequest::reset()
(...skipping 10 matching lines...) Expand all
65 WebDocument WebMediaDevicesRequest::ownerDocument() const 65 WebDocument WebMediaDevicesRequest::ownerDocument() const
66 { 66 {
67 ASSERT(!isNull()); 67 ASSERT(!isNull());
68 return WebDocument(m_private->ownerDocument()); 68 return WebDocument(m_private->ownerDocument());
69 } 69 }
70 70
71 void WebMediaDevicesRequest::requestSucceeded(WebVector<WebMediaDeviceInfo> webD evices) 71 void WebMediaDevicesRequest::requestSucceeded(WebVector<WebMediaDeviceInfo> webD evices)
72 { 72 {
73 ASSERT(!isNull()); 73 ASSERT(!isNull());
74 74
75 #if ENABLE(OILPAN)
76 MediaDeviceInfoVector devices;
77 #else
75 MediaDeviceInfoVector devices(webDevices.size()); 78 MediaDeviceInfoVector devices(webDevices.size());
haraken 2014/02/21 10:47:05 We should make this work in OILPAN instead of addi
79 #endif
76 for (size_t i = 0; i < webDevices.size(); ++i) 80 for (size_t i = 0; i < webDevices.size(); ++i)
77 devices[i] = MediaDeviceInfo::create(webDevices[i]); 81 devices[i] = MediaDeviceInfo::create(webDevices[i]);
78 82
79 m_private->succeed(devices); 83 m_private->succeed(devices);
80 } 84 }
81 85
82 bool WebMediaDevicesRequest::equals(const WebMediaDevicesRequest& other) const 86 bool WebMediaDevicesRequest::equals(const WebMediaDevicesRequest& other) const
83 { 87 {
84 if (isNull() || other.isNull()) 88 if (isNull() || other.isNull())
85 return false; 89 return false;
86 return m_private.get() == other.m_private.get(); 90 return m_private.get() == other.m_private.get();
87 } 91 }
88 92
89 void WebMediaDevicesRequest::assign(const WebMediaDevicesRequest& other) 93 void WebMediaDevicesRequest::assign(const WebMediaDevicesRequest& other)
90 { 94 {
91 m_private = other.m_private; 95 m_private = other.m_private;
92 } 96 }
93 97
94 WebMediaDevicesRequest::operator MediaDevicesRequest*() const 98 WebMediaDevicesRequest::operator MediaDevicesRequest*() const
95 { 99 {
96 return m_private.get(); 100 return m_private.get();
97 } 101 }
98 102
99 } // namespace blink 103 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698