| 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 | 11 | 
| 11 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" | 
| 12 #include "base/string16.h" | 13 #include "base/string16.h" | 
| 13 #include "chrome/test/webdriver/automation.h" | 14 #include "chrome/test/webdriver/automation.h" | 
| 14 #include "chrome/test/webdriver/error_codes.h" | 15 #include "chrome/test/webdriver/error_codes.h" | 
| 15 | 16 | 
| 16 class GURL; | 17 class GURL; | 
| 17 class ListValue; | 18 class ListValue; | 
| 18 class Value; | 19 class Value; | 
| 19 | 20 | 
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 91   // Switches the frame used by default. |index| is the zero-based frame index. | 92   // Switches the frame used by default. |index| is the zero-based frame index. | 
| 92   ErrorCode SwitchToFrameWithIndex(int index); | 93   ErrorCode SwitchToFrameWithIndex(int index); | 
| 93 | 94 | 
| 94   // Closes the current window. Returns true on success. | 95   // Closes the current window. Returns true on success. | 
| 95   // Note: The session will be deleted if this closes the last window in the | 96   // Note: The session will be deleted if this closes the last window in the | 
| 96   // session. | 97   // session. | 
| 97   bool CloseWindow(); | 98   bool CloseWindow(); | 
| 98 | 99 | 
| 99   inline const std::string& id() const { return id_; } | 100   inline const std::string& id() const { return id_; } | 
| 100 | 101 | 
| 101   inline int implicit_wait() { return implicit_wait_; } | 102   inline int implicit_wait() const { return implicit_wait_; } | 
| 102   inline void set_implicit_wait(const int& timeout) { | 103   inline void set_implicit_wait(const int& timeout) { | 
| 103     implicit_wait_ = timeout > 0 ? timeout : 0; | 104     implicit_wait_ = timeout > 0 ? timeout : 0; | 
| 104   } | 105   } | 
| 105 | 106 | 
| 106   enum Speed { kSlow, kMedium, kFast, kUnknown }; | 107   enum Speed { kSlow, kMedium, kFast, kUnknown }; | 
| 107   inline Speed speed() { return speed_; } | 108   inline Speed speed() { return speed_; } | 
| 108   inline void set_speed(Speed speed) { | 109   inline void set_speed(Speed speed) { | 
| 109     speed_ = speed; | 110     speed_ = speed; | 
| 110   } | 111   } | 
| 111 | 112 | 
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 149   int current_window_id_; | 150   int current_window_id_; | 
| 150 | 151 | 
| 151   DISALLOW_COPY_AND_ASSIGN(Session); | 152   DISALLOW_COPY_AND_ASSIGN(Session); | 
| 152 }; | 153 }; | 
| 153 | 154 | 
| 154 }  // namespace webdriver | 155 }  // namespace webdriver | 
| 155 | 156 | 
| 156 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Session); | 157 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Session); | 
| 157 | 158 | 
| 158 #endif  // CHROME_TEST_WEBDRIVER_SESSION_H_ | 159 #endif  // CHROME_TEST_WEBDRIVER_SESSION_H_ | 
| OLD | NEW | 
|---|