OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 // Ideally we would want our BackgroundModeData to be scoped_ptrs, | 121 // Ideally we would want our BackgroundModeData to be scoped_ptrs, |
122 // but since maps copy their entries, we can't used scoped_ptrs. | 122 // but since maps copy their entries, we can't used scoped_ptrs. |
123 // Similarly, we can't just have a map of BackgroundModeData objects, | 123 // Similarly, we can't just have a map of BackgroundModeData objects, |
124 // since BackgroundModeData contains a scoped_ptr which once again | 124 // since BackgroundModeData contains a scoped_ptr which once again |
125 // can't be copied. So rather than using BackgroundModeData* which | 125 // can't be copied. So rather than using BackgroundModeData* which |
126 // we'd have to remember to delete, we use the ref-counted linked_ptr | 126 // we'd have to remember to delete, we use the ref-counted linked_ptr |
127 // which is similar to a shared_ptr. | 127 // which is similar to a shared_ptr. |
128 typedef linked_ptr<BackgroundModeData> BackgroundModeInfo; | 128 typedef linked_ptr<BackgroundModeData> BackgroundModeInfo; |
129 | 129 |
130 // NotificationObserver implementation. | 130 // NotificationObserver implementation. |
131 virtual void Observe(NotificationType type, | 131 virtual void Observe(int type, |
132 const NotificationSource& source, | 132 const NotificationSource& source, |
133 const NotificationDetails& details) OVERRIDE; | 133 const NotificationDetails& details) OVERRIDE; |
134 | 134 |
135 // BackgroundApplicationListModel::Observer implementation. | 135 // BackgroundApplicationListModel::Observer implementation. |
136 virtual void OnApplicationDataChanged(const Extension* extension, | 136 virtual void OnApplicationDataChanged(const Extension* extension, |
137 Profile* profile) OVERRIDE; | 137 Profile* profile) OVERRIDE; |
138 virtual void OnApplicationListChanged(Profile* profile) OVERRIDE; | 138 virtual void OnApplicationListChanged(Profile* profile) OVERRIDE; |
139 | 139 |
140 // Overrides from SimpleMenuModel::Delegate implementation. | 140 // Overrides from SimpleMenuModel::Delegate implementation. |
141 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; | 141 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 // chrome would immediately exit due to having no open windows. | 256 // chrome would immediately exit due to having no open windows. |
257 bool keep_alive_for_startup_; | 257 bool keep_alive_for_startup_; |
258 | 258 |
259 // Provides a command id for each profile as they are created. | 259 // Provides a command id for each profile as they are created. |
260 int current_command_id_; | 260 int current_command_id_; |
261 | 261 |
262 DISALLOW_COPY_AND_ASSIGN(BackgroundModeManager); | 262 DISALLOW_COPY_AND_ASSIGN(BackgroundModeManager); |
263 }; | 263 }; |
264 | 264 |
265 #endif // CHROME_BROWSER_BACKGROUND_BACKGROUND_MODE_MANAGER_H_ | 265 #endif // CHROME_BROWSER_BACKGROUND_BACKGROUND_MODE_MANAGER_H_ |
OLD | NEW |