OLD | NEW |
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/browser/renderer_host/media/web_contents_capture_util.h" | 5 #include "content/browser/renderer_host/media/web_contents_capture_util.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/string_util.h" | |
10 #include "base/strings/string_piece.h" | 9 #include "base/strings/string_piece.h" |
| 10 #include "base/strings/string_util.h" |
11 | 11 |
12 namespace { | 12 namespace { |
13 | 13 |
14 const char kVirtualDeviceScheme[] = "virtual-media-stream://"; | 14 const char kVirtualDeviceScheme[] = "virtual-media-stream://"; |
15 | 15 |
16 } // namespace | 16 } // namespace |
17 | 17 |
18 namespace content { | 18 namespace content { |
19 | 19 |
20 std::string WebContentsCaptureUtil::AppendWebContentsDeviceScheme( | 20 std::string WebContentsCaptureUtil::AppendWebContentsDeviceScheme( |
(...skipping 29 matching lines...) Expand all Loading... |
50 | 50 |
51 const base::StringPiece component1(device_id.data(), sep_pos); | 51 const base::StringPiece component1(device_id.data(), sep_pos); |
52 const base::StringPiece component2(device_id.data() + sep_pos + 1, | 52 const base::StringPiece component2(device_id.data() + sep_pos + 1, |
53 device_id.length() - sep_pos - 1); | 53 device_id.length() - sep_pos - 1); |
54 | 54 |
55 return (base::StringToInt(component1, render_process_id) && | 55 return (base::StringToInt(component1, render_process_id) && |
56 base::StringToInt(component2, render_view_id)); | 56 base::StringToInt(component2, render_view_id)); |
57 } | 57 } |
58 | 58 |
59 } // namespace content | 59 } // namespace content |
OLD | NEW |