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..1c5c5a80b9b554d07be267409423316627654755 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,43 @@ class TestingAutomationProvider : public AutomationProvider, |
void ExecuteJavascriptJSON( |
base::DictionaryValue* args, IPC::Message* reply_message); |
+ // Creates a DomRaisedEventObserver associated with the AutomationEventQueue. |
+ // Example: |
+ // input: { "event_name": "login complete", |
+ // "windex": 1, |
+ // "tab_index": 1, |
+ // "frame_xpath": "//frames[1]", |
+ // } |
+ // output: { "observer_id": 1 } |
+ void AddDomRaisedEventObserver( |
+ base::DictionaryValue* args, IPC::Message* reply_message); |
+ |
+ // Removes an event observer associated with the AutomationEventQueue. |
+ // Example: |
+ // input: { "observer_id": 1 } |
+ // output: none |
+ void RemoveEventObserver( |
+ 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 GetNextEvent(base::DictionaryValue* args, IPC::Message* reply_message); |
+ |
+ // Removes all events and observers attached to the AutomationEventQueue. |
+ // Example: |
+ // input: none |
+ // output: none |
+ void ClearEventQueue( |
+ 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 +1602,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_; |
Nirnimesh
2012/02/29 03:22:08
Does this have to be allocated on the stack? It'll
craigdh
2012/02/29 22:53:43
A scoped_ptr seems reasonable.
|
+ |
DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); |
}; |