| 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 205   void set_speed(Speed speed); | 205   void set_speed(Speed speed); | 
| 206 | 206 | 
| 207   // Since screenshots can be very large when in base64 PNG format; the | 207   // Since screenshots can be very large when in base64 PNG format; the | 
| 208   // client is allowed to dyamically enable/disable screenshots on error | 208   // client is allowed to dyamically enable/disable screenshots on error | 
| 209   // during the lifetime of the session. | 209   // during the lifetime of the session. | 
| 210   bool screenshot_on_error() const; | 210   bool screenshot_on_error() const; | 
| 211   void set_screenshot_on_error(bool error); | 211   void set_screenshot_on_error(bool error); | 
| 212 | 212 | 
| 213   const FrameId& current_target() const; | 213   const FrameId& current_target() const; | 
| 214 | 214 | 
|  | 215   inline bool use_native_events() const { return use_native_events_; } | 
|  | 216 | 
|  | 217   inline void set_use_native_events(bool use_native_events) { | 
|  | 218     use_native_events_ = use_native_events; | 
|  | 219   } | 
|  | 220 | 
| 215  private: | 221  private: | 
| 216   void RunSessionTask(Task* task); | 222   void RunSessionTask(Task* task); | 
| 217   void RunSessionTaskOnSessionThread( | 223   void RunSessionTaskOnSessionThread( | 
| 218       Task* task, | 224       Task* task, | 
| 219       base::WaitableEvent* done_event); | 225       base::WaitableEvent* done_event); | 
| 220   void InitOnSessionThread(const FilePath& browser_dir, bool* success); | 226   void InitOnSessionThread(const FilePath& browser_dir, bool* success); | 
| 221   void TerminateOnSessionThread(); | 227   void TerminateOnSessionThread(); | 
| 222   void SendKeysOnSessionThread(const string16& keys, bool* success); | 228   void SendKeysOnSessionThread(const string16& keys, bool* success); | 
| 223   ErrorCode SwitchToFrameWithJavaScriptLocatedFrame( | 229   ErrorCode SwitchToFrameWithJavaScriptLocatedFrame( | 
| 224       const std::string& script, | 230       const std::string& script, | 
| (...skipping 13 matching lines...) Expand all  Loading... | 
| 238 | 244 | 
| 239   scoped_ptr<Automation> automation_; | 245   scoped_ptr<Automation> automation_; | 
| 240   base::Thread thread_; | 246   base::Thread thread_; | 
| 241 | 247 | 
| 242   int implicit_wait_; | 248   int implicit_wait_; | 
| 243   bool screenshot_on_error_; | 249   bool screenshot_on_error_; | 
| 244   Speed speed_; | 250   Speed speed_; | 
| 245 | 251 | 
| 246   FrameId current_target_; | 252   FrameId current_target_; | 
| 247 | 253 | 
|  | 254   bool use_native_events_; | 
|  | 255 | 
| 248   DISALLOW_COPY_AND_ASSIGN(Session); | 256   DISALLOW_COPY_AND_ASSIGN(Session); | 
| 249 }; | 257 }; | 
| 250 | 258 | 
| 251 }  // namespace webdriver | 259 }  // namespace webdriver | 
| 252 | 260 | 
| 253 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Session); | 261 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Session); | 
| 254 | 262 | 
| 255 #endif  // CHROME_TEST_WEBDRIVER_SESSION_H_ | 263 #endif  // CHROME_TEST_WEBDRIVER_SESSION_H_ | 
| OLD | NEW | 
|---|