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

Side by Side Diff: content/renderer/media/user_media_client_impl.cc

Issue 2799563002: Replace usage of WebVector::isEmpty with WebVector::empty().
Patch Set: Created 3 years, 8 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 (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 "content/renderer/media/user_media_client_impl.h" 5 #include "content/renderer/media/user_media_client_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
(...skipping 27 matching lines...) Expand all
38 #include "third_party/WebKit/public/platform/WebString.h" 38 #include "third_party/WebKit/public/platform/WebString.h"
39 #include "third_party/WebKit/public/web/WebDocument.h" 39 #include "third_party/WebKit/public/web/WebDocument.h"
40 #include "third_party/WebKit/public/web/WebLocalFrame.h" 40 #include "third_party/WebKit/public/web/WebLocalFrame.h"
41 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" 41 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h"
42 42
43 namespace content { 43 namespace content {
44 namespace { 44 namespace {
45 45
46 void CopyFirstString(const blink::StringConstraint& constraint, 46 void CopyFirstString(const blink::StringConstraint& constraint,
47 std::string* destination) { 47 std::string* destination) {
48 if (!constraint.exact().isEmpty()) 48 if (!constraint.exact().empty())
49 *destination = constraint.exact()[0].utf8(); 49 *destination = constraint.exact()[0].utf8();
50 } 50 }
51 51
52 bool FindDeviceId(const blink::WebVector<blink::WebString> candidates, 52 bool FindDeviceId(const blink::WebVector<blink::WebString> candidates,
53 const MediaDeviceInfoArray& device_infos, 53 const MediaDeviceInfoArray& device_infos,
54 std::string* device_id) { 54 std::string* device_id) {
55 for (const auto& candidate : candidates) { 55 for (const auto& candidate : candidates) {
56 auto it = std::find_if(device_infos.begin(), device_infos.end(), 56 auto it = std::find_if(device_infos.begin(), device_infos.end(),
57 [&candidate](const MediaDeviceInfo& info) { 57 [&candidate](const MediaDeviceInfo& info) {
58 return info.device_id == candidate.utf8(); 58 return info.device_id == candidate.utf8();
(...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after
1361 const blink::WebString& result_name) { 1361 const blink::WebString& result_name) {
1362 // Check if we're waiting to be notified of this source. If not, then we'll 1362 // Check if we're waiting to be notified of this source. If not, then we'll
1363 // ignore the notification. 1363 // ignore the notification.
1364 auto found = std::find(sources_waiting_for_callback_.begin(), 1364 auto found = std::find(sources_waiting_for_callback_.begin(),
1365 sources_waiting_for_callback_.end(), source); 1365 sources_waiting_for_callback_.end(), source);
1366 if (found != sources_waiting_for_callback_.end()) 1366 if (found != sources_waiting_for_callback_.end())
1367 OnTrackStarted(source, result, result_name); 1367 OnTrackStarted(source, result, result_name);
1368 } 1368 }
1369 1369
1370 } // namespace content 1370 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/peer_connection_tracker.cc ('k') | content/renderer/media/video_track_to_pepper_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698