| 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 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 #include "content/public/browser/download_manager.h" | 46 #include "content/public/browser/download_manager.h" |
| 47 #include "content/public/browser/notification_observer.h" | 47 #include "content/public/browser/notification_observer.h" |
| 48 #include "content/public/browser/notification_registrar.h" | 48 #include "content/public/browser/notification_registrar.h" |
| 49 #include "content/public/browser/notification_types.h" | 49 #include "content/public/browser/notification_types.h" |
| 50 #include "ui/gfx/point.h" | 50 #include "ui/gfx/point.h" |
| 51 #include "ui/gfx/size.h" | 51 #include "ui/gfx/size.h" |
| 52 | 52 |
| 53 class AutomationProvider; | 53 class AutomationProvider; |
| 54 class BalloonCollection; | 54 class BalloonCollection; |
| 55 class Browser; | 55 class Browser; |
| 56 class ExtensionService; | |
| 57 class Notification; | 56 class Notification; |
| 58 class Profile; | 57 class Profile; |
| 59 class SavePackage; | 58 class SavePackage; |
| 60 | 59 |
| 61 namespace automation { | 60 namespace automation { |
| 62 class Error; | 61 class Error; |
| 63 } | 62 } |
| 64 | 63 |
| 65 #if defined(OS_CHROMEOS) | 64 #if defined(OS_CHROMEOS) |
| 66 namespace chromeos { | 65 namespace chromeos { |
| 67 class ExistingUserController; | 66 class ExistingUserController; |
| 68 class WizardScreen; | 67 class WizardScreen; |
| 69 } | 68 } |
| 70 #endif // defined(OS_CHROMEOS) | 69 #endif // defined(OS_CHROMEOS) |
| 71 | 70 |
| 72 namespace content { | 71 namespace content { |
| 73 class NavigationController; | 72 class NavigationController; |
| 74 class RenderViewHost; | 73 class RenderViewHost; |
| 75 class WebContents; | 74 class WebContents; |
| 76 } | 75 } |
| 77 | 76 |
| 78 namespace extensions { | 77 namespace extensions { |
| 79 class Extension; | 78 class Extension; |
| 79 class ExtensionSystem; |
| 80 class ProcessManager; | 80 class ProcessManager; |
| 81 } | 81 } |
| 82 | 82 |
| 83 namespace history { | 83 namespace history { |
| 84 class TopSites; | 84 class TopSites; |
| 85 } | 85 } |
| 86 | 86 |
| 87 namespace IPC { | 87 namespace IPC { |
| 88 class Message; | 88 class Message; |
| 89 } | 89 } |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 | 321 |
| 322 DISALLOW_COPY_AND_ASSIGN(ExtensionUninstallObserver); | 322 DISALLOW_COPY_AND_ASSIGN(ExtensionUninstallObserver); |
| 323 }; | 323 }; |
| 324 | 324 |
| 325 // Observes when an extension has finished loading and is ready for use. Also | 325 // Observes when an extension has finished loading and is ready for use. Also |
| 326 // checks for possible install errors. | 326 // checks for possible install errors. |
| 327 class ExtensionReadyNotificationObserver | 327 class ExtensionReadyNotificationObserver |
| 328 : public content::NotificationObserver { | 328 : public content::NotificationObserver { |
| 329 public: | 329 public: |
| 330 // Creates an observer that replies using the JSON automation interface. | 330 // Creates an observer that replies using the JSON automation interface. |
| 331 ExtensionReadyNotificationObserver(extensions::ProcessManager* manager, | 331 ExtensionReadyNotificationObserver( |
| 332 ExtensionService* service, | 332 extensions::ExtensionSystem* extension_system, |
| 333 AutomationProvider* automation, | 333 AutomationProvider* automation, |
| 334 IPC::Message* reply_message); | 334 IPC::Message* reply_message); |
| 335 virtual ~ExtensionReadyNotificationObserver(); | 335 virtual ~ExtensionReadyNotificationObserver(); |
| 336 | 336 |
| 337 // Overridden from content::NotificationObserver: | 337 // Overridden from content::NotificationObserver: |
| 338 virtual void Observe(int type, | 338 virtual void Observe(int type, |
| 339 const content::NotificationSource& source, | 339 const content::NotificationSource& source, |
| 340 const content::NotificationDetails& details) OVERRIDE; | 340 const content::NotificationDetails& details) OVERRIDE; |
| 341 | 341 |
| 342 private: | 342 private: |
| 343 void Init(); | 343 void Init(); |
| 344 | 344 |
| 345 content::NotificationRegistrar registrar_; | 345 content::NotificationRegistrar registrar_; |
| 346 extensions::ProcessManager* manager_; | 346 extensions::ExtensionSystem* extension_system_; |
| 347 ExtensionService* service_; | |
| 348 base::WeakPtr<AutomationProvider> automation_; | 347 base::WeakPtr<AutomationProvider> automation_; |
| 349 scoped_ptr<IPC::Message> reply_message_; | 348 scoped_ptr<IPC::Message> reply_message_; |
| 350 const extensions::Extension* extension_; | 349 const extensions::Extension* extension_; |
| 351 | 350 |
| 352 DISALLOW_COPY_AND_ASSIGN(ExtensionReadyNotificationObserver); | 351 DISALLOW_COPY_AND_ASSIGN(ExtensionReadyNotificationObserver); |
| 353 }; | 352 }; |
| 354 | 353 |
| 355 class ExtensionUnloadNotificationObserver | 354 class ExtensionUnloadNotificationObserver |
| 356 : public content::NotificationObserver { | 355 : public content::NotificationObserver { |
| 357 public: | 356 public: |
| (...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1461 base::WeakPtr<AutomationProvider> automation_; | 1460 base::WeakPtr<AutomationProvider> automation_; |
| 1462 scoped_ptr<IPC::Message> reply_message_; | 1461 scoped_ptr<IPC::Message> reply_message_; |
| 1463 int new_window_id_; | 1462 int new_window_id_; |
| 1464 int num_loads_; | 1463 int num_loads_; |
| 1465 | 1464 |
| 1466 DISALLOW_COPY_AND_ASSIGN( | 1465 DISALLOW_COPY_AND_ASSIGN( |
| 1467 BrowserOpenedWithExistingProfileNotificationObserver); | 1466 BrowserOpenedWithExistingProfileNotificationObserver); |
| 1468 }; | 1467 }; |
| 1469 | 1468 |
| 1470 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ | 1469 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ |
| OLD | NEW |