| 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_EXTENSIONS_SHELL_WINDOW_REGISTRY_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_SHELL_WINDOW_REGISTRY_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_SHELL_WINDOW_REGISTRY_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_SHELL_WINDOW_REGISTRY_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 virtual ~Observer() {} | 43 virtual ~Observer() {} |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 typedef std::set<ShellWindow*> ShellWindowSet; | 46 typedef std::set<ShellWindow*> ShellWindowSet; |
| 47 typedef ShellWindowSet::const_iterator const_iterator; | 47 typedef ShellWindowSet::const_iterator const_iterator; |
| 48 | 48 |
| 49 ShellWindowRegistry(); | 49 ShellWindowRegistry(); |
| 50 virtual ~ShellWindowRegistry(); | 50 virtual ~ShellWindowRegistry(); |
| 51 | 51 |
| 52 // Returns the instance for the given profile, or NULL if none. This is | 52 // Returns the instance for the given profile, or NULL if none. This is |
| 53 // a convenience wrapper around ShellWindowRegistryFactory::GetForProfile. | 53 // a convenience wrapper around ShellWindowRegistry::Factory::GetForProfile. |
| 54 static ShellWindowRegistry* Get(Profile* profile); | 54 static ShellWindowRegistry* Get(Profile* profile); |
| 55 | 55 |
| 56 void AddShellWindow(ShellWindow* shell_window); | 56 void AddShellWindow(ShellWindow* shell_window); |
| 57 void RemoveShellWindow(ShellWindow* shell_window); | 57 void RemoveShellWindow(ShellWindow* shell_window); |
| 58 | 58 |
| 59 void AddObserver(Observer* observer); | 59 void AddObserver(Observer* observer); |
| 60 void RemoveObserver(Observer* observer); | 60 void RemoveObserver(Observer* observer); |
| 61 | 61 |
| 62 // Returns a set of windows owned by the application identified by app_id. | 62 // Returns a set of windows owned by the application identified by app_id. |
| 63 ShellWindowSet GetShellWindowsForApp(const std::string& app_id) const; | 63 ShellWindowSet GetShellWindowsForApp(const std::string& app_id) const; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 91 virtual bool ServiceIsNULLWhileTesting() OVERRIDE; | 91 virtual bool ServiceIsNULLWhileTesting() OVERRIDE; |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 ShellWindowSet shell_windows_; | 94 ShellWindowSet shell_windows_; |
| 95 ObserverList<Observer> observers_; | 95 ObserverList<Observer> observers_; |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 } // namespace extensions | 98 } // namespace extensions |
| 99 | 99 |
| 100 #endif // CHROME_BROWSER_EXTENSIONS_SHELL_WINDOW_REGISTRY_H_ | 100 #endif // CHROME_BROWSER_EXTENSIONS_SHELL_WINDOW_REGISTRY_H_ |
| OLD | NEW |