| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <string> | 5 #include <string> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 succeeded_count_++; | 211 succeeded_count_++; |
| 212 config_ = result; | 212 config_ = result; |
| 213 } | 213 } |
| 214 | 214 |
| 215 void OnNotSupported(const blink::WebString&) { not_supported_count_++; } | 215 void OnNotSupported(const blink::WebString&) { not_supported_count_++; } |
| 216 | 216 |
| 217 scoped_ptr<FakeKeySystems> key_systems_; | 217 scoped_ptr<FakeKeySystems> key_systems_; |
| 218 scoped_ptr<FakeMediaPermission> media_permission_; | 218 scoped_ptr<FakeMediaPermission> media_permission_; |
| 219 | 219 |
| 220 // Held values for the call to SelectConfig(). | 220 // Held values for the call to SelectConfig(). |
| 221 blink::WebString key_system_ = kSupported; | 221 blink::WebString key_system_ = blink::WebString::fromUTF8(kSupported); |
| 222 std::vector<blink::WebMediaKeySystemConfiguration> configs_; | 222 std::vector<blink::WebMediaKeySystemConfiguration> configs_; |
| 223 blink::WebSecurityOrigin security_origin_ = | 223 blink::WebSecurityOrigin security_origin_ = |
| 224 blink::WebSecurityOrigin::createFromString(kDefaultSecurityOrigin); | 224 blink::WebSecurityOrigin::createFromString(kDefaultSecurityOrigin); |
| 225 | 225 |
| 226 // Holds the last successful accumulated configuration. | 226 // Holds the last successful accumulated configuration. |
| 227 blink::WebMediaKeySystemConfiguration config_; | 227 blink::WebMediaKeySystemConfiguration config_; |
| 228 | 228 |
| 229 int succeeded_count_; | 229 int succeeded_count_; |
| 230 int not_supported_count_; | 230 int not_supported_count_; |
| 231 | 231 |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 754 | 754 |
| 755 blink::WebMediaKeySystemConfiguration config2; | 755 blink::WebMediaKeySystemConfiguration config2; |
| 756 config2.label = "b"; | 756 config2.label = "b"; |
| 757 configs_.push_back(config2); | 757 configs_.push_back(config2); |
| 758 | 758 |
| 759 ASSERT_TRUE(SelectConfigRequestsPermissionAndReturnsConfig()); | 759 ASSERT_TRUE(SelectConfigRequestsPermissionAndReturnsConfig()); |
| 760 ASSERT_EQ("b", config_.label); | 760 ASSERT_EQ("b", config_.label); |
| 761 } | 761 } |
| 762 | 762 |
| 763 } // namespace media | 763 } // namespace media |
| OLD | NEW |