| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_MEDIA_WV_TEST_LICENSE_SERVER_CONFIG_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_WV_TEST_LICENSE_SERVER_CONFIG_H_ |
| 6 #define CHROME_BROWSER_MEDIA_WV_TEST_LICENSE_SERVER_CONFIG_H_ | 6 #define CHROME_BROWSER_MEDIA_WV_TEST_LICENSE_SERVER_CONFIG_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 10 #include "base/macros.h" |
| 8 #include "chrome/browser/media/test_license_server_config.h" | 11 #include "chrome/browser/media/test_license_server_config.h" |
| 9 | 12 |
| 10 // License configuration to run the Widevine test license server. | 13 // License configuration to run the Widevine test license server. |
| 11 class WVTestLicenseServerConfig : public TestLicenseServerConfig { | 14 class WVTestLicenseServerConfig : public TestLicenseServerConfig { |
| 12 public: | 15 public: |
| 13 WVTestLicenseServerConfig(); | 16 WVTestLicenseServerConfig(); |
| 14 ~WVTestLicenseServerConfig() override; | 17 ~WVTestLicenseServerConfig() override; |
| 15 | 18 |
| 16 std::string GetServerURL() override; | 19 std::string GetServerURL() override; |
| 17 | 20 |
| 18 bool GetServerCommandLine(base::CommandLine* command_line) override; | 21 bool GetServerCommandLine(base::CommandLine* command_line) override; |
| 19 | 22 |
| 20 bool IsPlatformSupported() override; | 23 bool IsPlatformSupported() override; |
| 21 | 24 |
| 22 private: | 25 private: |
| 23 // Server port. The port value should be set by calling SelectServerPort(). | 26 // Server port. The port value should be set by calling SelectServerPort(). |
| 24 uint16 port_; | 27 uint16_t port_; |
| 25 | 28 |
| 26 // Retrieves the path for the WV license server root: | 29 // Retrieves the path for the WV license server root: |
| 27 // third_party/widevine/test/license_server/ | 30 // third_party/widevine/test/license_server/ |
| 28 void GetLicenseServerRootPath(base::FilePath* path); | 31 void GetLicenseServerRootPath(base::FilePath* path); |
| 29 | 32 |
| 30 // Retrieves the path for the WV license server: | 33 // Retrieves the path for the WV license server: |
| 31 // <license_server_root_path>/<platform>/ | 34 // <license_server_root_path>/<platform>/ |
| 32 void GetLicenseServerPath(base::FilePath* path); | 35 void GetLicenseServerPath(base::FilePath* path); |
| 33 | 36 |
| 34 // Sets the server port to a randomly available port within a limited range. | 37 // Sets the server port to a randomly available port within a limited range. |
| 35 bool SelectServerPort(); | 38 bool SelectServerPort(); |
| 36 | 39 |
| 37 DISALLOW_COPY_AND_ASSIGN(WVTestLicenseServerConfig); | 40 DISALLOW_COPY_AND_ASSIGN(WVTestLicenseServerConfig); |
| 38 }; | 41 }; |
| 39 | 42 |
| 40 #endif // CHROME_BROWSER_MEDIA_WV_TEST_LICENSE_SERVER_CONFIG_H_ | 43 #endif // CHROME_BROWSER_MEDIA_WV_TEST_LICENSE_SERVER_CONFIG_H_ |
| OLD | NEW |