[ExtensionToolbarMac] Restrict action button drags to the container's bounds
[chromium-blink-merge.git] / chrome / browser / media / test_license_server.h
blob37e710b42af0af66e5e9c36bec7488a1b5b5cee7
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_MEDIA_TEST_LICENSE_SERVER_H_
6 #define CHROME_BROWSER_MEDIA_TEST_LICENSE_SERVER_H_
8 #include <string>
9 #include "base/memory/scoped_ptr.h"
10 #include "base/process/process_handle.h"
12 class TestLicenseServerConfig;
14 // Class used to start a test license server.
15 class TestLicenseServer {
16 public:
17 explicit TestLicenseServer(scoped_ptr<TestLicenseServerConfig> server_config);
18 ~TestLicenseServer();
20 // Returns true if the server started successfully. False otherwise.
21 bool Start();
22 // Returns true if the server was stopped successfully. False otherwise.
23 bool Stop();
24 // Returns a string containing the URL and port the server is listening to.
25 std::string GetServerURL();
27 private:
28 // License server configuration class used to obtain server paths, etc.
29 scoped_ptr<TestLicenseServerConfig> server_config_;
30 // Process handle for the license server.
31 base::ProcessHandle license_server_process_;
33 DISALLOW_COPY_AND_ASSIGN(TestLicenseServer);
36 #endif // CHROME_BROWSER_MEDIA_TEST_LICENSE_SERVER_H_