Chromium Code Reviews| Index: chrome/browser/automation/testing_automation_provider.h |
| diff --git a/chrome/browser/automation/testing_automation_provider.h b/chrome/browser/automation/testing_automation_provider.h |
| index 50c4c5e4692c2c6996f24b39ae4047df73facb20..5ae4b7d1d352b26aa59da6c99c4e3d01008883c7 100644 |
| --- a/chrome/browser/automation/testing_automation_provider.h |
| +++ b/chrome/browser/automation/testing_automation_provider.h |
| @@ -13,6 +13,8 @@ |
| #include "base/basictypes.h" |
| #include "base/compiler_specific.h" |
| #include "base/memory/scoped_ptr.h" |
| +#include "chrome/browser/automation/automation_event_observer.h" |
| +#include "chrome/browser/automation/automation_event_queue.h" |
| #include "chrome/browser/automation/automation_provider.h" |
| #include "chrome/browser/automation/automation_provider_json.h" |
| #include "chrome/browser/history/history.h" |
| @@ -944,6 +946,49 @@ class TestingAutomationProvider : public AutomationProvider, |
| void ExecuteJavascriptJSON( |
| base::DictionaryValue* args, IPC::Message* reply_message); |
| + // Creates a RaisedEventObserver associated with the AutomationEventQueue. |
| + // Example: |
| + // input: { "event_name": "login complete", |
| + // "windex": 1, |
| + // "tab_index": 1, |
| + // "frame_xpath": "//frames[1]", |
| + // } |
| + // output: { "observer_id": 1 } |
| + void AddRaisedEventObserver( |
|
Nirnimesh
2012/02/24 23:18:09
Add 'dom' or 'app'
craigdh
2012/02/27 22:43:38
Done.
|
| + base::DictionaryValue* args, IPC::Message* reply_message); |
| + |
| + // Retrieves an event from the AutomationEventQueue. |
| + // Blocks if 'blocking' is true, otherwise returns immediately. |
| + // Example: |
| + // input: { "observer_id": 1, |
| + // "blocking": true, |
| + // } |
| + // output: { "type": "raised", |
| + // "name": "login complete" |
| + // "id": 1, |
| + // } |
| + void GetEvent(base::DictionaryValue* args, IPC::Message* reply_message); |
| + |
| + // Removes an event observer associated with the AutomationEventQueue. |
| + // Example: |
| + // input: { "observer_id": 1 } |
| + // output: none |
| + void RemoveEventObserver( |
|
Nirnimesh
2012/02/24 23:18:09
Move this next to AddRaisedEventObserver
craigdh
2012/02/27 22:43:38
Done.
|
| + base::DictionaryValue* args, IPC::Message* reply_message); |
| + |
| + // Removes all events from the AutomationEventQueue. |
| + // Example: |
| + // input: none |
| + // output: none |
| + void ClearEvents(base::DictionaryValue* args, IPC::Message* reply_message); |
| + |
| + // Removes all event observers associated with the AutomationEventQueue. |
| + // Example: |
| + // input: none |
| + // output: none |
| + void ClearEventObservers( |
| + base::DictionaryValue* args, IPC::Message* reply_message); |
| + |
| // Executes javascript in the specified frame of a render view. |
| // Uses the JSON interface. Waits for a result from the |
| // |DOMAutomationController|. The javascript must send a string. |
| @@ -1563,6 +1608,9 @@ class TestingAutomationProvider : public AutomationProvider, |
| // The stored data for the ImportSettings operation. |
| ImportSettingsData import_settings_data_; |
| + // The automation event observer queue. |
| + AutomationEventQueue automation_event_queue_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); |
| }; |