Chromium Code Reviews| Index: chrome/browser/extensions/shell_window_registry.h |
| diff --git a/chrome/browser/extensions/shell_window_registry.h b/chrome/browser/extensions/shell_window_registry.h |
| index 97ecc3a2ad56ce8d9b3e48b04e13ac27bcee570b..7379bf70e28b8de509f3eba636a067a98f7c1f23 100644 |
| --- a/chrome/browser/extensions/shell_window_registry.h |
| +++ b/chrome/browser/extensions/shell_window_registry.h |
| @@ -12,6 +12,8 @@ |
| #include "base/observer_list.h" |
| #include "chrome/browser/profiles/profile_keyed_service.h" |
| #include "chrome/browser/profiles/profile_keyed_service_factory.h" |
| +#include "content/public/browser/notification_observer.h" |
| +#include "content/public/browser/notification_registrar.h" |
| #include "ui/gfx/native_widget_types.h" |
| class Profile; |
| @@ -30,7 +32,8 @@ namespace extensions { |
| // page, shell windows, tray view, panels etc.) and other app level behaviour |
| // (e.g. notifications the app is interested in, lifetime of the background |
| // page). |
| -class ShellWindowRegistry : public ProfileKeyedService { |
| +class ShellWindowRegistry : public ProfileKeyedService, |
| + public content::NotificationObserver { |
| public: |
| class Observer { |
| public: |
| @@ -45,8 +48,9 @@ class ShellWindowRegistry : public ProfileKeyedService { |
| typedef std::set<ShellWindow*> ShellWindowSet; |
| typedef ShellWindowSet::const_iterator const_iterator; |
| + typedef std::set<std::string> InspectedWindowSet; |
|
tapted
2012/10/23 06:04:15
this could be called InspectedWindowKeySet but tha
|
| - ShellWindowRegistry(); |
| + explicit ShellWindowRegistry(Profile* profile); |
| virtual ~ShellWindowRegistry(); |
| // Returns the instance for the given profile, or NULL if none. This is |
| @@ -72,6 +76,17 @@ class ShellWindowRegistry : public ProfileKeyedService { |
| // be returned, otherwise an arbitrary window will be returned. |
| ShellWindow* GetCurrentShellWindowForApp(const std::string& app_id) const; |
| + // Returns whether a ShellWindow's ID was last known to have a DevToolsAgent |
| + // attached to it, which should be restored during a reload of a corresponding |
| + // newly created |render_view_host|. |
| + bool HadDevToolsAttached(content::RenderViewHost* render_view_host) const; |
|
benwells
2012/10/23 06:18:48
Where is the logic that tracks window positions to
tapted
2012/10/23 07:04:23
It's in extensions::ShellWindowGeometryCache and a
|
| + |
| + protected: |
| + // content::NotificationObserver: |
| + virtual void Observe(int type, |
| + const content::NotificationSource& source, |
| + const content::NotificationDetails& details) OVERRIDE; |
| + |
| private: |
| class Factory : public ProfileKeyedServiceFactory { |
| public: |
| @@ -93,7 +108,9 @@ class ShellWindowRegistry : public ProfileKeyedService { |
| }; |
| ShellWindowSet shell_windows_; |
| + InspectedWindowSet inspected_windows_; |
| ObserverList<Observer> observers_; |
| + content::NotificationRegistrar registrar_; |
| }; |
| } // namespace extensions |