| 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_GEOMETRY_CACHE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_SHELL_WINDOW_GEOMETRY_CACHE_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_SHELL_WINDOW_GEOMETRY_CACHE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_SHELL_WINDOW_GEOMETRY_CACHE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 static ShellWindowGeometryCache* Get(content::BrowserContext* context); | 66 static ShellWindowGeometryCache* Get(content::BrowserContext* context); |
| 67 | 67 |
| 68 // Save the geometry and state associated with |extension_id| and |window_id|. | 68 // Save the geometry and state associated with |extension_id| and |window_id|. |
| 69 void SaveGeometry(const std::string& extension_id, | 69 void SaveGeometry(const std::string& extension_id, |
| 70 const std::string& window_id, | 70 const std::string& window_id, |
| 71 const gfx::Rect& bounds, | 71 const gfx::Rect& bounds, |
| 72 const gfx::Rect& screen_bounds, | 72 const gfx::Rect& screen_bounds, |
| 73 ui::WindowShowState state); | 73 ui::WindowShowState state); |
| 74 | 74 |
| 75 // Get any saved geometry and state associated with |extension_id| and | 75 // Get any saved geometry and state associated with |extension_id| and |
| 76 // |window_id|. If saved data exists, sets |bounds| and |state| if not NULL | 76 // |window_id|. If saved data exists, sets |bounds|, |screen_bounds| and |
| 77 // and returns true. | 77 // |state| if not NULL and returns true. |
| 78 bool GetGeometry(const std::string& extension_id, | 78 bool GetGeometry(const std::string& extension_id, |
| 79 const std::string& window_id, | 79 const std::string& window_id, |
| 80 gfx::Rect* bounds, | 80 gfx::Rect* bounds, |
| 81 gfx::Rect* screen_bounds, | 81 gfx::Rect* screen_bounds, |
| 82 ui::WindowShowState* state); | 82 ui::WindowShowState* state); |
| 83 | 83 |
| 84 // BrowserContextKeyedService | 84 // BrowserContextKeyedService |
| 85 virtual void Shutdown() OVERRIDE; | 85 virtual void Shutdown() OVERRIDE; |
| 86 | 86 |
| 87 // Maximum number of windows we'll cache the geometry for per app. | 87 // Maximum number of windows we'll cache the geometry for per app. |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 // The timeout value we'll use for |sync_timer_|. | 133 // The timeout value we'll use for |sync_timer_|. |
| 134 base::TimeDelta sync_delay_; | 134 base::TimeDelta sync_delay_; |
| 135 | 135 |
| 136 content::NotificationRegistrar registrar_; | 136 content::NotificationRegistrar registrar_; |
| 137 }; | 137 }; |
| 138 | 138 |
| 139 } // namespace apps | 139 } // namespace apps |
| 140 | 140 |
| 141 #endif // CHROME_BROWSER_EXTENSIONS_SHELL_WINDOW_GEOMETRY_CACHE_H_ | 141 #endif // CHROME_BROWSER_EXTENSIONS_SHELL_WINDOW_GEOMETRY_CACHE_H_ |
| OLD | NEW |