| 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_WEBDRIVER_WEBDRIVER_SESSION_H_ | 5 #ifndef CHROME_TEST_WEBDRIVER_WEBDRIVER_SESSION_H_ |
| 6 #define CHROME_TEST_WEBDRIVER_WEBDRIVER_SESSION_H_ | 6 #define CHROME_TEST_WEBDRIVER_WEBDRIVER_SESSION_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 // Note: The session will be deleted if this closes the last window in the | 177 // Note: The session will be deleted if this closes the last window in the |
| 178 // session. | 178 // session. |
| 179 Error* CloseWindow(); | 179 Error* CloseWindow(); |
| 180 | 180 |
| 181 // Gets the bounds for the specified window. | 181 // Gets the bounds for the specified window. |
| 182 Error* GetWindowBounds(const WebViewId& window, Rect* bounds); | 182 Error* GetWindowBounds(const WebViewId& window, Rect* bounds); |
| 183 | 183 |
| 184 // Sets the bounds for the specified window. | 184 // Sets the bounds for the specified window. |
| 185 Error* SetWindowBounds(const WebViewId& window, const Rect& bounds); | 185 Error* SetWindowBounds(const WebViewId& window, const Rect& bounds); |
| 186 | 186 |
| 187 // Maximizes the specified window. |
| 188 Error* MaximizeWindow(const WebViewId& window); |
| 189 |
| 187 // Gets the message of the currently active JavaScript modal dialog. | 190 // Gets the message of the currently active JavaScript modal dialog. |
| 188 Error* GetAlertMessage(std::string* text); | 191 Error* GetAlertMessage(std::string* text); |
| 189 | 192 |
| 190 // Sets the prompt text to use when accepting or dismissing a JavaScript | 193 // Sets the prompt text to use when accepting or dismissing a JavaScript |
| 191 // modal dialog. | 194 // modal dialog. |
| 192 Error* SetAlertPromptText(const std::string& alert_prompt_text); | 195 Error* SetAlertPromptText(const std::string& alert_prompt_text); |
| 193 | 196 |
| 194 // Accept or dismiss the currently active JavaScript modal dialog with the | 197 // Accept or dismiss the currently active JavaScript modal dialog with the |
| 195 // previously set alert prompt text. Then clears the saved alert prompt text. | 198 // previously set alert prompt text. Then clears the saved alert prompt text. |
| 196 Error* AcceptOrDismissAlert(bool accept); | 199 Error* AcceptOrDismissAlert(bool accept); |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 const std::string& key, | 363 const std::string& key, |
| 361 std::string* value); | 364 std::string* value); |
| 362 | 365 |
| 363 // Gets the total number of items in the HTML5 localStorage object. | 366 // Gets the total number of items in the HTML5 localStorage object. |
| 364 Error* GetStorageSize(StorageType type, int* size); | 367 Error* GetStorageSize(StorageType type, int* size); |
| 365 | 368 |
| 366 // Removes all items in the HTML5 localStorage object. | 369 // Removes all items in the HTML5 localStorage object. |
| 367 Error* ClearStorage(StorageType type); | 370 Error* ClearStorage(StorageType type); |
| 368 | 371 |
| 369 // Gets the keys of all items of the HTML5 localStorage object. If there are | 372 // Gets the keys of all items of the HTML5 localStorage object. If there are |
| 370 // no errors, the function sets |value| and the caller takes ownership. | 373 // no errors, the function sets |keys| and the caller takes ownership. |
| 371 Error* GetStorageKeys(StorageType type, base::ListValue** keys); | 374 Error* GetStorageKeys(StorageType type, base::ListValue** keys); |
| 372 | 375 |
| 373 // Gets the current geolocation. | 376 // Gets the current geolocation. |
| 374 Error* GetGeolocation(scoped_ptr<base::DictionaryValue>* geolocation); | 377 Error* GetGeolocation(scoped_ptr<base::DictionaryValue>* geolocation); |
| 375 | 378 |
| 376 // Overrides the current geolocation. | 379 // Overrides the current geolocation. |
| 377 Error* OverrideGeolocation(base::DictionaryValue* geolocation); | 380 Error* OverrideGeolocation(base::DictionaryValue* geolocation); |
| 378 | 381 |
| 379 const std::string& id() const; | 382 const std::string& id() const; |
| 380 | 383 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 // (e.g., 18.0.995.0 -> 995). Only valid after Chrome has started. | 494 // (e.g., 18.0.995.0 -> 995). Only valid after Chrome has started. |
| 492 // See http://dev.chromium.org/releases/version-numbers. | 495 // See http://dev.chromium.org/releases/version-numbers. |
| 493 int build_no_; | 496 int build_no_; |
| 494 | 497 |
| 495 DISALLOW_COPY_AND_ASSIGN(Session); | 498 DISALLOW_COPY_AND_ASSIGN(Session); |
| 496 }; | 499 }; |
| 497 | 500 |
| 498 } // namespace webdriver | 501 } // namespace webdriver |
| 499 | 502 |
| 500 #endif // CHROME_TEST_WEBDRIVER_WEBDRIVER_SESSION_H_ | 503 #endif // CHROME_TEST_WEBDRIVER_WEBDRIVER_SESSION_H_ |
| OLD | NEW |