| 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_H_ | 5 #ifndef CHROME_TEST_WEBDRIVER_SESSION_H_ |
| 6 #define CHROME_TEST_WEBDRIVER_SESSION_H_ | 6 #define CHROME_TEST_WEBDRIVER_SESSION_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 } | 181 } |
| 182 | 182 |
| 183 enum Speed { kSlow, kMedium, kFast, kUnknown }; | 183 enum Speed { kSlow, kMedium, kFast, kUnknown }; |
| 184 inline Speed speed() { return speed_; } | 184 inline Speed speed() { return speed_; } |
| 185 inline void set_speed(Speed speed) { | 185 inline void set_speed(Speed speed) { |
| 186 speed_ = speed; | 186 speed_ = speed; |
| 187 } | 187 } |
| 188 | 188 |
| 189 const FrameId& current_target() const; | 189 const FrameId& current_target() const; |
| 190 | 190 |
| 191 inline bool use_native_events() const { return use_native_events_; } |
| 192 |
| 193 inline void set_use_native_events(bool use_native_events) { |
| 194 use_native_events_ = use_native_events; |
| 195 } |
| 196 |
| 191 private: | 197 private: |
| 192 void RunSessionTask(Task* task); | 198 void RunSessionTask(Task* task); |
| 193 void RunSessionTaskOnSessionThread( | 199 void RunSessionTaskOnSessionThread( |
| 194 Task* task, | 200 Task* task, |
| 195 base::WaitableEvent* done_event); | 201 base::WaitableEvent* done_event); |
| 196 void InitOnSessionThread(const FilePath& browser_dir, bool* success); | 202 void InitOnSessionThread(const FilePath& browser_dir, bool* success); |
| 197 void TerminateOnSessionThread(); | 203 void TerminateOnSessionThread(); |
| 198 void SendKeysOnSessionThread(const string16& keys, bool* success); | 204 void SendKeysOnSessionThread(const string16& keys, bool* success); |
| 199 ErrorCode SwitchToFrameWithJavaScriptLocatedFrame( | 205 ErrorCode SwitchToFrameWithJavaScriptLocatedFrame( |
| 200 const std::string& script, | 206 const std::string& script, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 213 const std::string id_; | 219 const std::string id_; |
| 214 | 220 |
| 215 scoped_ptr<Automation> automation_; | 221 scoped_ptr<Automation> automation_; |
| 216 base::Thread thread_; | 222 base::Thread thread_; |
| 217 | 223 |
| 218 int implicit_wait_; | 224 int implicit_wait_; |
| 219 Speed speed_; | 225 Speed speed_; |
| 220 | 226 |
| 221 FrameId current_target_; | 227 FrameId current_target_; |
| 222 | 228 |
| 229 bool use_native_events_; |
| 230 |
| 223 DISALLOW_COPY_AND_ASSIGN(Session); | 231 DISALLOW_COPY_AND_ASSIGN(Session); |
| 224 }; | 232 }; |
| 225 | 233 |
| 226 } // namespace webdriver | 234 } // namespace webdriver |
| 227 | 235 |
| 228 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Session); | 236 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Session); |
| 229 | 237 |
| 230 #endif // CHROME_TEST_WEBDRIVER_SESSION_H_ | 238 #endif // CHROME_TEST_WEBDRIVER_SESSION_H_ |
| OLD | NEW |