| 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 30 matching lines...) Expand all Loading... |
| 41 virtual ~Observer() {} | 41 virtual ~Observer() {} |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 typedef std::set<ShellWindow*> ShellWindowSet; | 44 typedef std::set<ShellWindow*> ShellWindowSet; |
| 45 typedef ShellWindowSet::const_iterator const_iterator; | 45 typedef ShellWindowSet::const_iterator const_iterator; |
| 46 | 46 |
| 47 ShellWindowRegistry(); | 47 ShellWindowRegistry(); |
| 48 virtual ~ShellWindowRegistry(); | 48 virtual ~ShellWindowRegistry(); |
| 49 | 49 |
| 50 // Returns the instance for the given profile, or NULL if none. This is | 50 // Returns the instance for the given profile, or NULL if none. This is |
| 51 // a convenience wrapper around ShellWindowRegistryFactory::GetForProfile. | 51 // a convenience wrapper around ShellWindowRegistry::Factory::GetForProfile. |
| 52 static ShellWindowRegistry* Get(Profile* profile); | 52 static ShellWindowRegistry* Get(Profile* profile); |
| 53 | 53 |
| 54 void AddShellWindow(ShellWindow* shell_window); | 54 void AddShellWindow(ShellWindow* shell_window); |
| 55 void RemoveShellWindow(ShellWindow* shell_window); | 55 void RemoveShellWindow(ShellWindow* shell_window); |
| 56 | 56 |
| 57 void AddObserver(Observer* observer); | 57 void AddObserver(Observer* observer); |
| 58 void RemoveObserver(Observer* observer); | 58 void RemoveObserver(Observer* observer); |
| 59 | 59 |
| 60 // Returns a set of windows owned by the application identified by app_id. | 60 // Returns a set of windows owned by the application identified by app_id. |
| 61 ShellWindowSet GetShellWindowsForApp(const std::string& app_id) const; | 61 ShellWindowSet GetShellWindowsForApp(const std::string& app_id) const; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 83 Profile* profile) const OVERRIDE; | 83 Profile* profile) const OVERRIDE; |
| 84 virtual bool ServiceIsCreatedWithProfile() OVERRIDE; | 84 virtual bool ServiceIsCreatedWithProfile() OVERRIDE; |
| 85 virtual bool ServiceIsNULLWhileTesting() OVERRIDE; | 85 virtual bool ServiceIsNULLWhileTesting() OVERRIDE; |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 ShellWindowSet shell_windows_; | 88 ShellWindowSet shell_windows_; |
| 89 ObserverList<Observer> observers_; | 89 ObserverList<Observer> observers_; |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 #endif // CHROME_BROWSER_EXTENSIONS_SHELL_WINDOW_REGISTRY_H_ | 92 #endif // CHROME_BROWSER_EXTENSIONS_SHELL_WINDOW_REGISTRY_H_ |
| OLD | NEW |