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_AUTOMATION_H_ | 5 #ifndef CHROME_TEST_WEBDRIVER_AUTOMATION_H_ |
6 #define CHROME_TEST_WEBDRIVER_AUTOMATION_H_ | 6 #define CHROME_TEST_WEBDRIVER_AUTOMATION_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
| 12 #include "base/file_path.h" |
12 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
14 #include "base/task.h" | 15 #include "base/task.h" |
15 #include "chrome/common/automation_constants.h" | 16 #include "chrome/common/automation_constants.h" |
16 #include "ui/base/keycodes/keyboard_codes.h" | 17 #include "ui/base/keycodes/keyboard_codes.h" |
17 | 18 |
18 class AutomationProxy; | 19 class AutomationProxy; |
19 class CommandLine; | 20 class CommandLine; |
20 class DictionaryValue; | 21 class DictionaryValue; |
21 class FilePath; | 22 class FilePath; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 const WebKeyEvent& key_event, | 69 const WebKeyEvent& key_event, |
69 Error** error); | 70 Error** error); |
70 | 71 |
71 // Sends an OS level key event to the current browser. Waits until the key | 72 // Sends an OS level key event to the current browser. Waits until the key |
72 // has been processed by the browser. | 73 // has been processed by the browser. |
73 void SendNativeKeyEvent(int tab_id, | 74 void SendNativeKeyEvent(int tab_id, |
74 ui::KeyboardCode key_code, | 75 ui::KeyboardCode key_code, |
75 int modifiers, | 76 int modifiers, |
76 Error** error); | 77 Error** error); |
77 | 78 |
| 79 // Drag and drop the file paths to the given location. |
| 80 void DragAndDropFilePaths(int tab_id, |
| 81 const gfx::Point& location, |
| 82 const std::vector<FilePath::StringType>& paths, |
| 83 Error** error); |
| 84 |
78 // Captures a snapshot of the tab to the specified path. The PNG will | 85 // Captures a snapshot of the tab to the specified path. The PNG will |
79 // contain the entire page, including what is not in the current view | 86 // contain the entire page, including what is not in the current view |
80 // on the screen. | 87 // on the screen. |
81 void CaptureEntirePageAsPNG(int tab_id, const FilePath& path, Error** error); | 88 void CaptureEntirePageAsPNG(int tab_id, const FilePath& path, Error** error); |
82 | 89 |
83 void NavigateToURL(int tab_id, const std::string& url, Error** error); | 90 void NavigateToURL(int tab_id, const std::string& url, Error** error); |
84 void GoForward(int tab_id, Error** error); | 91 void GoForward(int tab_id, Error** error); |
85 void GoBack(int tab_id, Error** error); | 92 void GoBack(int tab_id, Error** error); |
86 void Reload(int tab_id, Error** error); | 93 void Reload(int tab_id, Error** error); |
87 | 94 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 scoped_ptr<ProxyLauncher> launcher_; | 165 scoped_ptr<ProxyLauncher> launcher_; |
159 | 166 |
160 DISALLOW_COPY_AND_ASSIGN(Automation); | 167 DISALLOW_COPY_AND_ASSIGN(Automation); |
161 }; | 168 }; |
162 | 169 |
163 } // namespace webdriver | 170 } // namespace webdriver |
164 | 171 |
165 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Automation); | 172 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Automation); |
166 | 173 |
167 #endif // CHROME_TEST_WEBDRIVER_AUTOMATION_H_ | 174 #endif // CHROME_TEST_WEBDRIVER_AUTOMATION_H_ |
OLD | NEW |