| 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_BACKGROUND_BACKGROUND_MODE_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_BACKGROUND_BACKGROUND_MODE_MANAGER_H_ |
| 6 #define CHROME_BROWSER_BACKGROUND_BACKGROUND_MODE_MANAGER_H_ | 6 #define CHROME_BROWSER_BACKGROUND_BACKGROUND_MODE_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 void EndBackgroundMode(); | 232 void EndBackgroundMode(); |
| 233 | 233 |
| 234 // Enables keep alive and the status tray icon if and only if background mode | 234 // Enables keep alive and the status tray icon if and only if background mode |
| 235 // is active and not suspended. | 235 // is active and not suspended. |
| 236 virtual void UpdateKeepAliveAndTrayIcon(); | 236 virtual void UpdateKeepAliveAndTrayIcon(); |
| 237 | 237 |
| 238 // If --no-startup-window is passed, BackgroundModeManager will manually keep | 238 // If --no-startup-window is passed, BackgroundModeManager will manually keep |
| 239 // chrome running while waiting for apps to load. This is called when we no | 239 // chrome running while waiting for apps to load. This is called when we no |
| 240 // longer need to do this (either because the user has chosen to exit chrome | 240 // longer need to do this (either because the user has chosen to exit chrome |
| 241 // manually, or all apps have been loaded). | 241 // manually, or all apps have been loaded). |
| 242 void EndKeepAliveForStartup(); | 242 void DecrementKeepAliveCountForStartup(); |
| 243 | 243 |
| 244 // Return an appropriate name for a Preferences menu entry. Preferences is | 244 // Return an appropriate name for a Preferences menu entry. Preferences is |
| 245 // sometimes called Options or Settings. | 245 // sometimes called Options or Settings. |
| 246 base::string16 GetPreferencesMenuLabel(); | 246 base::string16 GetPreferencesMenuLabel(); |
| 247 | 247 |
| 248 // Create a status tray icon to allow the user to shutdown Chrome when running | 248 // Create a status tray icon to allow the user to shutdown Chrome when running |
| 249 // in background mode. Virtual to enable testing. | 249 // in background mode. Virtual to enable testing. |
| 250 virtual void CreateStatusTrayIcon(); | 250 virtual void CreateStatusTrayIcon(); |
| 251 | 251 |
| 252 // Removes the status tray icon because we are exiting background mode. | 252 // Removes the status tray icon because we are exiting background mode. |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 // Set to true when background mode is suspended. | 336 // Set to true when background mode is suspended. |
| 337 bool background_mode_suspended_; | 337 bool background_mode_suspended_; |
| 338 | 338 |
| 339 // Set to true when background mode is keeping Chrome alive. | 339 // Set to true when background mode is keeping Chrome alive. |
| 340 bool keeping_alive_; | 340 bool keeping_alive_; |
| 341 | 341 |
| 342 DISALLOW_COPY_AND_ASSIGN(BackgroundModeManager); | 342 DISALLOW_COPY_AND_ASSIGN(BackgroundModeManager); |
| 343 }; | 343 }; |
| 344 | 344 |
| 345 #endif // CHROME_BROWSER_BACKGROUND_BACKGROUND_MODE_MANAGER_H_ | 345 #endif // CHROME_BROWSER_BACKGROUND_BACKGROUND_MODE_MANAGER_H_ |
| OLD | NEW |