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_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ | 5 #ifndef CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ |
6 #define CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ | 6 #define CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <map> | 10 #include <map> |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
44 #include "chrome/browser/password_manager/password_store_consumer.h" | 44 #include "chrome/browser/password_manager/password_store_consumer.h" |
45 #include "chrome/browser/search_engines/template_url_service_observer.h" | 45 #include "chrome/browser/search_engines/template_url_service_observer.h" |
46 #include "chrome/browser/tabs/tab_strip_model.h" | 46 #include "chrome/browser/tabs/tab_strip_model.h" |
47 #include "chrome/common/automation_constants.h" | 47 #include "chrome/common/automation_constants.h" |
48 #include "chrome/common/extensions/extension_constants.h" | 48 #include "chrome/common/extensions/extension_constants.h" |
49 #include "content/public/browser/download_item.h" | 49 #include "content/public/browser/download_item.h" |
50 #include "content/public/browser/download_manager.h" | 50 #include "content/public/browser/download_manager.h" |
51 #include "content/public/browser/notification_observer.h" | 51 #include "content/public/browser/notification_observer.h" |
52 #include "content/public/browser/notification_registrar.h" | 52 #include "content/public/browser/notification_registrar.h" |
53 #include "content/public/browser/notification_types.h" | 53 #include "content/public/browser/notification_types.h" |
54 #include "ui/gfx/point.h" | |
54 #include "ui/gfx/size.h" | 55 #include "ui/gfx/size.h" |
55 | 56 |
56 class AutomationProvider; | 57 class AutomationProvider; |
57 class BalloonCollection; | 58 class BalloonCollection; |
58 class Browser; | 59 class Browser; |
59 class Extension; | 60 class Extension; |
60 class ExtensionProcessManager; | 61 class ExtensionProcessManager; |
61 class ExtensionService; | 62 class ExtensionService; |
62 class InfoBarTabHelper; | 63 class InfoBarTabHelper; |
63 class Notification; | 64 class Notification; |
64 class Profile; | 65 class Profile; |
65 class SavePackage; | 66 class SavePackage; |
66 class TranslateInfoBarDelegate; | 67 class TranslateInfoBarDelegate; |
67 | 68 |
69 namespace automation { | |
70 class Error; | |
71 } | |
72 | |
68 #if defined(OS_CHROMEOS) | 73 #if defined(OS_CHROMEOS) |
69 namespace chromeos { | 74 namespace chromeos { |
70 class ExistingUserController; | 75 class ExistingUserController; |
71 } | 76 } |
72 #endif // defined(OS_CHROMEOS) | 77 #endif // defined(OS_CHROMEOS) |
73 | 78 |
74 namespace IPC { | 79 namespace IPC { |
75 class Message; | 80 class Message; |
76 } | 81 } |
77 | 82 |
(...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1308 | 1313 |
1309 base::WeakPtr<AutomationProvider> automation_; | 1314 base::WeakPtr<AutomationProvider> automation_; |
1310 scoped_ptr<IPC::Message> reply_message_; | 1315 scoped_ptr<IPC::Message> reply_message_; |
1311 TabContentsWrapper* tab_contents_; | 1316 TabContentsWrapper* tab_contents_; |
1312 FilePath image_path_; | 1317 FilePath image_path_; |
1313 content::NotificationRegistrar registrar_; | 1318 content::NotificationRegistrar registrar_; |
1314 | 1319 |
1315 DISALLOW_COPY_AND_ASSIGN(PageSnapshotTaker); | 1320 DISALLOW_COPY_AND_ASSIGN(PageSnapshotTaker); |
1316 }; | 1321 }; |
1317 | 1322 |
1323 // Observes when an automation requested mouse event is processed | |
1324 // by the renderer and sends an automation reply. | |
1325 class MouseEventProcessedObserver : public TabEventObserver, | |
1326 public content::NotificationObserver { | |
1327 public: | |
1328 MouseEventProcessedObserver(AutomationProvider* automation, | |
1329 IPC::Message* reply_message, | |
1330 TabContentsWrapper* tab_contents); | |
1331 virtual ~MouseEventProcessedObserver(); | |
1332 | |
1333 private: | |
1334 // TabEventObserver overrides. | |
1335 virtual void OnWillProcessMouseEventAt(const gfx::Point& point) OVERRIDE; | |
1336 virtual void OnProcessMouseEventACK( | |
1337 bool success, | |
1338 const std::string& error_msg) OVERRIDE; | |
1339 // NotificationObserver overrides. | |
1340 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
| |
1341 const content::NotificationSource& source, | |
1342 const content::NotificationDetails& details); | |
craigdh
2012/05/08 21:18:40
Add OVERRIDE.
kkania
2012/05/09 18:19:59
Done.
| |
1343 | |
1344 // Helper method to send a response back to the client. Deletes this. | |
1345 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.
| |
1346 | |
1347 base::WeakPtr<AutomationProvider> automation_; | |
1348 scoped_ptr<IPC::Message> reply_message_; | |
1349 content::NotificationRegistrar registrar_; | |
1350 bool has_point_; | |
1351 gfx::Point point_; | |
1352 | |
1353 DISALLOW_COPY_AND_ASSIGN(MouseEventProcessedObserver); | |
1354 }; | |
1355 | |
1318 class NTPInfoObserver : public content::NotificationObserver { | 1356 class NTPInfoObserver : public content::NotificationObserver { |
1319 public: | 1357 public: |
1320 NTPInfoObserver(AutomationProvider* automation, | 1358 NTPInfoObserver(AutomationProvider* automation, |
1321 IPC::Message* reply_message, | 1359 IPC::Message* reply_message, |
1322 CancelableRequestConsumer* consumer); | 1360 CancelableRequestConsumer* consumer); |
1323 virtual ~NTPInfoObserver(); | 1361 virtual ~NTPInfoObserver(); |
1324 | 1362 |
1325 virtual void Observe(int type, | 1363 virtual void Observe(int type, |
1326 const content::NotificationSource& source, | 1364 const content::NotificationSource& source, |
1327 const content::NotificationDetails& details); | 1365 const content::NotificationDetails& details); |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1810 private: | 1848 private: |
1811 base::WeakPtr<AutomationProvider> automation_; | 1849 base::WeakPtr<AutomationProvider> automation_; |
1812 scoped_ptr<IPC::Message> reply_message_; | 1850 scoped_ptr<IPC::Message> reply_message_; |
1813 std::string extension_id_; | 1851 std::string extension_id_; |
1814 content::NotificationRegistrar registrar_; | 1852 content::NotificationRegistrar registrar_; |
1815 | 1853 |
1816 DISALLOW_COPY_AND_ASSIGN(ExtensionPopupObserver); | 1854 DISALLOW_COPY_AND_ASSIGN(ExtensionPopupObserver); |
1817 }; | 1855 }; |
1818 | 1856 |
1819 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ | 1857 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ |
OLD | NEW |