Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(657)

Side by Side Diff: chrome/browser/automation/automation_provider_observers.h

Issue 131743021: app_shell: Extract extension runtime data from ExtensionService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup, unit test (runtime_data) Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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(extensions::ExtensionSystem* system,
332 ExtensionService* service,
333 AutomationProvider* automation, 332 AutomationProvider* automation,
334 IPC::Message* reply_message); 333 IPC::Message* reply_message);
335 virtual ~ExtensionReadyNotificationObserver(); 334 virtual ~ExtensionReadyNotificationObserver();
336 335
337 // Overridden from content::NotificationObserver: 336 // Overridden from content::NotificationObserver:
338 virtual void Observe(int type, 337 virtual void Observe(int type,
339 const content::NotificationSource& source, 338 const content::NotificationSource& source,
340 const content::NotificationDetails& details) OVERRIDE; 339 const content::NotificationDetails& details) OVERRIDE;
341 340
342 private: 341 private:
343 void Init(); 342 void Init();
344 343
345 content::NotificationRegistrar registrar_; 344 content::NotificationRegistrar registrar_;
346 extensions::ProcessManager* manager_; 345 extensions::ExtensionSystem* system_;
347 ExtensionService* service_;
348 base::WeakPtr<AutomationProvider> automation_; 346 base::WeakPtr<AutomationProvider> automation_;
349 scoped_ptr<IPC::Message> reply_message_; 347 scoped_ptr<IPC::Message> reply_message_;
350 const extensions::Extension* extension_; 348 const extensions::Extension* extension_;
351 349
352 DISALLOW_COPY_AND_ASSIGN(ExtensionReadyNotificationObserver); 350 DISALLOW_COPY_AND_ASSIGN(ExtensionReadyNotificationObserver);
353 }; 351 };
354 352
355 class ExtensionUnloadNotificationObserver 353 class ExtensionUnloadNotificationObserver
356 : public content::NotificationObserver { 354 : public content::NotificationObserver {
357 public: 355 public:
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1461 base::WeakPtr<AutomationProvider> automation_; 1459 base::WeakPtr<AutomationProvider> automation_;
1462 scoped_ptr<IPC::Message> reply_message_; 1460 scoped_ptr<IPC::Message> reply_message_;
1463 int new_window_id_; 1461 int new_window_id_;
1464 int num_loads_; 1462 int num_loads_;
1465 1463
1466 DISALLOW_COPY_AND_ASSIGN( 1464 DISALLOW_COPY_AND_ASSIGN(
1467 BrowserOpenedWithExistingProfileNotificationObserver); 1465 BrowserOpenedWithExistingProfileNotificationObserver);
1468 }; 1466 };
1469 1467
1470 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ 1468 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698