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 #ifndef CHROME_TEST_CHROMEDRIVER_SESSION_H_ | 5 #ifndef CHROME_TEST_CHROMEDRIVER_SESSION_H_ |
6 #define CHROME_TEST_CHROMEDRIVER_SESSION_H_ | 6 #define CHROME_TEST_CHROMEDRIVER_SESSION_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/synchronization/lock.h" | 13 #include "base/synchronization/lock.h" |
14 #include "chrome/test/chromedriver/basic_types.h" | 14 #include "chrome/test/chromedriver/basic_types.h" |
15 | 15 |
16 class Chrome; | 16 class Chrome; |
| 17 class Status; |
17 | 18 |
18 struct Session { | 19 struct Session { |
19 explicit Session(const std::string& id); | 20 explicit Session(const std::string& id); |
20 Session(const std::string& id, scoped_ptr<Chrome> chrome); | 21 Session(const std::string& id, scoped_ptr<Chrome> chrome); |
21 ~Session(); | 22 ~Session(); |
| 23 Status WaitForPendingNavigations(); |
22 | 24 |
23 const std::string id; | 25 const std::string id; |
24 scoped_ptr<Chrome> chrome; | 26 scoped_ptr<Chrome> chrome; |
25 std::string frame; | 27 std::string frame; |
26 WebPoint mouse_position; | 28 WebPoint mouse_position; |
27 int implicit_wait; | 29 int implicit_wait; |
28 int page_load_timeout; | 30 int page_load_timeout; |
29 int script_timeout; | 31 int script_timeout; |
30 }; | 32 }; |
31 | 33 |
(...skipping 15 matching lines...) Expand all Loading... |
47 private: | 49 private: |
48 virtual ~SessionAccessorImpl(); | 50 virtual ~SessionAccessorImpl(); |
49 | 51 |
50 base::Lock session_lock_; | 52 base::Lock session_lock_; |
51 scoped_ptr<Session> session_; | 53 scoped_ptr<Session> session_; |
52 | 54 |
53 DISALLOW_COPY_AND_ASSIGN(SessionAccessorImpl); | 55 DISALLOW_COPY_AND_ASSIGN(SessionAccessorImpl); |
54 }; | 56 }; |
55 | 57 |
56 #endif // CHROME_TEST_CHROMEDRIVER_SESSION_H_ | 58 #endif // CHROME_TEST_CHROMEDRIVER_SESSION_H_ |
OLD | NEW |