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" |
11 #include "base/prefs/public/pref_change_registrar.h" | 11 #include "base/prefs/public/pref_change_registrar.h" |
12 #include "chrome/browser/background/background_application_list_model.h" | 12 #include "chrome/browser/background/background_application_list_model.h" |
13 #include "chrome/browser/profiles/profile_info_cache_observer.h" | 13 #include "chrome/browser/profiles/profile_info_cache_observer.h" |
14 #include "chrome/browser/profiles/profile_keyed_service.h" | 14 #include "chrome/browser/profiles/profile_keyed_service.h" |
15 #include "chrome/browser/status_icons/status_icon.h" | 15 #include "chrome/browser/status_icons/status_icon.h" |
16 #include "content/public/browser/notification_observer.h" | 16 #include "content/public/browser/notification_observer.h" |
17 #include "content/public/browser/notification_registrar.h" | 17 #include "content/public/browser/notification_registrar.h" |
18 #include "ui/base/models/simple_menu_model.h" | 18 #include "ui/base/models/simple_menu_model.h" |
19 | 19 |
20 class Browser; | 20 class Browser; |
21 class CommandLine; | 21 class CommandLine; |
22 class PrefServiceSimple; | 22 class PrefRegistrySimple; |
23 class Profile; | 23 class Profile; |
24 class ProfileInfoCache; | 24 class ProfileInfoCache; |
25 class StatusIcon; | 25 class StatusIcon; |
26 class StatusTray; | 26 class StatusTray; |
27 | 27 |
28 namespace extensions { | 28 namespace extensions { |
29 class Extension; | 29 class Extension; |
30 } | 30 } |
31 | 31 |
32 // BackgroundModeManager is responsible for switching Chrome into and out of | 32 // BackgroundModeManager is responsible for switching Chrome into and out of |
(...skipping 13 matching lines...) Expand all Loading... |
46 class BackgroundModeManager | 46 class BackgroundModeManager |
47 : public content::NotificationObserver, | 47 : public content::NotificationObserver, |
48 public BackgroundApplicationListModel::Observer, | 48 public BackgroundApplicationListModel::Observer, |
49 public ProfileInfoCacheObserver, | 49 public ProfileInfoCacheObserver, |
50 public ui::SimpleMenuModel::Delegate { | 50 public ui::SimpleMenuModel::Delegate { |
51 public: | 51 public: |
52 BackgroundModeManager(CommandLine* command_line, | 52 BackgroundModeManager(CommandLine* command_line, |
53 ProfileInfoCache* profile_cache); | 53 ProfileInfoCache* profile_cache); |
54 virtual ~BackgroundModeManager(); | 54 virtual ~BackgroundModeManager(); |
55 | 55 |
56 static void RegisterPrefs(PrefServiceSimple* prefs); | 56 static void RegisterPrefs(PrefRegistrySimple* registry); |
57 | 57 |
58 virtual void RegisterProfile(Profile* profile); | 58 virtual void RegisterProfile(Profile* profile); |
59 | 59 |
60 static void LaunchBackgroundApplication(Profile* profile, | 60 static void LaunchBackgroundApplication(Profile* profile, |
61 const extensions::Extension* extension); | 61 const extensions::Extension* extension); |
62 | 62 |
63 // For testing purposes. | 63 // For testing purposes. |
64 int NumberOfBackgroundModeData(); | 64 int NumberOfBackgroundModeData(); |
65 | 65 |
66 private: | 66 private: |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 // app). | 303 // app). |
304 bool keep_alive_for_test_; | 304 bool keep_alive_for_test_; |
305 | 305 |
306 // Provides a command id for each profile as they are created. | 306 // Provides a command id for each profile as they are created. |
307 int current_command_id_; | 307 int current_command_id_; |
308 | 308 |
309 DISALLOW_COPY_AND_ASSIGN(BackgroundModeManager); | 309 DISALLOW_COPY_AND_ASSIGN(BackgroundModeManager); |
310 }; | 310 }; |
311 | 311 |
312 #endif // CHROME_BROWSER_BACKGROUND_BACKGROUND_MODE_MANAGER_H_ | 312 #endif // CHROME_BROWSER_BACKGROUND_BACKGROUND_MODE_MANAGER_H_ |
OLD | NEW |