Index: chrome/browser/automation/automation_provider_observers.h |
diff --git a/chrome/browser/automation/automation_provider_observers.h b/chrome/browser/automation/automation_provider_observers.h |
index 2b3c7d2c606f9b5ae0622f2f5f8e26adca1afa70..9f2dda1866d84b2cc0415179f6195ed454292078 100644 |
--- a/chrome/browser/automation/automation_provider_observers.h |
+++ b/chrome/browser/automation/automation_provider_observers.h |
@@ -51,6 +51,7 @@ |
#include "content/public/browser/notification_observer.h" |
#include "content/public/browser/notification_registrar.h" |
#include "content/public/browser/notification_types.h" |
+#include "ui/gfx/point.h" |
#include "ui/gfx/size.h" |
class AutomationProvider; |
@@ -65,6 +66,10 @@ class Profile; |
class SavePackage; |
class TranslateInfoBarDelegate; |
+namespace automation { |
+class Error; |
+} |
+ |
#if defined(OS_CHROMEOS) |
namespace chromeos { |
class ExistingUserController; |
@@ -1315,6 +1320,39 @@ class PageSnapshotTaker : public TabEventObserver, |
DISALLOW_COPY_AND_ASSIGN(PageSnapshotTaker); |
}; |
+// Observes when an automation requested mouse event is processed |
+// by the renderer and sends an automation reply. |
+class MouseEventProcessedObserver : public TabEventObserver, |
+ public content::NotificationObserver { |
+ public: |
+ MouseEventProcessedObserver(AutomationProvider* automation, |
+ IPC::Message* reply_message, |
+ TabContentsWrapper* tab_contents); |
+ virtual ~MouseEventProcessedObserver(); |
+ |
+ private: |
+ // TabEventObserver overrides. |
+ virtual void OnWillProcessMouseEventAt(const gfx::Point& point) OVERRIDE; |
+ virtual void OnProcessMouseEventACK( |
+ bool success, |
+ const std::string& error_msg) OVERRIDE; |
+ // NotificationObserver overrides. |
+ virtual void Observe(int type, |
craigdh
2012/05/08 21:18:40
Why are the three preceding functions private when
kkania
2012/05/09 18:19:59
The idea is to communicate to the client of this c
|
+ const content::NotificationSource& source, |
+ const content::NotificationDetails& details); |
craigdh
2012/05/08 21:18:40
Add OVERRIDE.
kkania
2012/05/09 18:19:59
Done.
|
+ |
+ // Helper method to send a response back to the client. Deletes this. |
+ void SendMessage(bool success, const automation::Error& error); |
craigdh
2012/05/08 21:18:40
Start private function names with an _.
craigdh
2012/05/08 21:21:45
nvm.
|
+ |
+ base::WeakPtr<AutomationProvider> automation_; |
+ scoped_ptr<IPC::Message> reply_message_; |
+ content::NotificationRegistrar registrar_; |
+ bool has_point_; |
+ gfx::Point point_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(MouseEventProcessedObserver); |
+}; |
+ |
class NTPInfoObserver : public content::NotificationObserver { |
public: |
NTPInfoObserver(AutomationProvider* automation, |