| 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_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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 base::WeakPtr<AutomationProvider> automation_; | 274 base::WeakPtr<AutomationProvider> automation_; |
| 275 scoped_ptr<IPC::Message> reply_message_; | 275 scoped_ptr<IPC::Message> reply_message_; |
| 276 | 276 |
| 277 TabStripModel* tab_strip_model_; | 277 TabStripModel* tab_strip_model_; |
| 278 | 278 |
| 279 const int target_tab_count_; | 279 const int target_tab_count_; |
| 280 | 280 |
| 281 DISALLOW_COPY_AND_ASSIGN(TabCountChangeObserver); | 281 DISALLOW_COPY_AND_ASSIGN(TabCountChangeObserver); |
| 282 }; | 282 }; |
| 283 | 283 |
| 284 // Observes when an extension has finished installing or possible install | |
| 285 // errors. This does not guarantee that the extension is ready for use. | |
| 286 class ExtensionInstallNotificationObserver : public NotificationObserver { | |
| 287 public: | |
| 288 ExtensionInstallNotificationObserver(AutomationProvider* automation, | |
| 289 int id, | |
| 290 IPC::Message* reply_message); | |
| 291 virtual ~ExtensionInstallNotificationObserver(); | |
| 292 | |
| 293 // Implementation of NotificationObserver. | |
| 294 virtual void Observe(int type, | |
| 295 const NotificationSource& source, | |
| 296 const NotificationDetails& details); | |
| 297 | |
| 298 private: | |
| 299 // Send |response| back to the provider's client. | |
| 300 void SendResponse(AutomationMsg_ExtensionResponseValues response); | |
| 301 | |
| 302 NotificationRegistrar registrar_; | |
| 303 base::WeakPtr<AutomationProvider> automation_; | |
| 304 int id_; | |
| 305 scoped_ptr<IPC::Message> reply_message_; | |
| 306 | |
| 307 DISALLOW_COPY_AND_ASSIGN(ExtensionInstallNotificationObserver); | |
| 308 }; | |
| 309 | |
| 310 // Observes when an extension has been uninstalled. | 284 // Observes when an extension has been uninstalled. |
| 311 class ExtensionUninstallObserver : public NotificationObserver { | 285 class ExtensionUninstallObserver : public NotificationObserver { |
| 312 public: | 286 public: |
| 313 ExtensionUninstallObserver(AutomationProvider* automation, | 287 ExtensionUninstallObserver(AutomationProvider* automation, |
| 314 IPC::Message* reply_message, | 288 IPC::Message* reply_message, |
| 315 const std::string& id); | 289 const std::string& id); |
| 316 virtual ~ExtensionUninstallObserver(); | 290 virtual ~ExtensionUninstallObserver(); |
| 317 | 291 |
| 318 // Implementation of NotificationObserver. | 292 // Implementation of NotificationObserver. |
| 319 virtual void Observe(int type, | 293 virtual void Observe(int type, |
| (...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1638 | 1612 |
| 1639 private: | 1613 private: |
| 1640 NotificationRegistrar registrar_; | 1614 NotificationRegistrar registrar_; |
| 1641 base::WeakPtr<AutomationProvider> automation_; | 1615 base::WeakPtr<AutomationProvider> automation_; |
| 1642 scoped_ptr<IPC::Message> reply_message_; | 1616 scoped_ptr<IPC::Message> reply_message_; |
| 1643 | 1617 |
| 1644 DISALLOW_COPY_AND_ASSIGN(DragTargetDropAckNotificationObserver); | 1618 DISALLOW_COPY_AND_ASSIGN(DragTargetDropAckNotificationObserver); |
| 1645 }; | 1619 }; |
| 1646 | 1620 |
| 1647 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ | 1621 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ |
| OLD | NEW |