OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TEST_WEBDRIVER_SESSION_MANAGER_H_ | 5 #ifndef CHROME_TEST_WEBDRIVER_SESSION_MANAGER_H_ |
6 #define CHROME_TEST_WEBDRIVER_SESSION_MANAGER_H_ | 6 #define CHROME_TEST_WEBDRIVER_SESSION_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 bool Remove(const std::string& id); | 31 bool Remove(const std::string& id); |
32 bool Has(const std::string& id) const; | 32 bool Has(const std::string& id) const; |
33 | 33 |
34 Session* GetSession(const std::string& id) const; | 34 Session* GetSession(const std::string& id) const; |
35 | 35 |
36 void set_port(const std::string& port); | 36 void set_port(const std::string& port); |
37 | 37 |
38 void set_url_base(const std::string& url_base); | 38 void set_url_base(const std::string& url_base); |
39 std::string url_base() const; | 39 std::string url_base() const; |
40 | 40 |
41 void set_chrome_dir(const FilePath& chrome_dir); | |
42 FilePath chrome_dir() const; | |
43 | |
44 private: | 41 private: |
45 SessionManager(); | 42 SessionManager(); |
46 ~SessionManager(); | 43 ~SessionManager(); |
47 friend struct DefaultSingletonTraits<SessionManager>; | 44 friend struct DefaultSingletonTraits<SessionManager>; |
48 | 45 |
49 std::map<std::string, Session*> map_; | 46 std::map<std::string, Session*> map_; |
50 mutable base::Lock map_lock_; | 47 mutable base::Lock map_lock_; |
51 std::string port_; | 48 std::string port_; |
52 std::string url_base_; | 49 std::string url_base_; |
53 FilePath chrome_dir_; | |
54 | 50 |
55 DISALLOW_COPY_AND_ASSIGN(SessionManager); | 51 DISALLOW_COPY_AND_ASSIGN(SessionManager); |
56 }; | 52 }; |
57 | 53 |
58 } // namespace webdriver | 54 } // namespace webdriver |
59 | 55 |
60 #endif // CHROME_TEST_WEBDRIVER_SESSION_MANAGER_H_ | 56 #endif // CHROME_TEST_WEBDRIVER_SESSION_MANAGER_H_ |
OLD | NEW |