Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(764)

Side by Side Diff: chrome/browser/background_mode_manager.h

Issue 3304015: Use PrefChangeRegistrar everywhere (Closed)
Patch Set: final version for commit Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/background_mode_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_MODE_MANAGER_H_ 5 #ifndef CHROME_BROWSER_BACKGROUND_MODE_MANAGER_H_
6 #define CHROME_BROWSER_BACKGROUND_MODE_MANAGER_H_ 6 #define CHROME_BROWSER_BACKGROUND_MODE_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "app/menus/simple_menu_model.h" 9 #include "app/menus/simple_menu_model.h"
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
11 #include "chrome/browser/prefs/pref_change_registrar.h"
11 #include "chrome/browser/status_icons/status_icon.h" 12 #include "chrome/browser/status_icons/status_icon.h"
12 #include "chrome/common/notification_observer.h" 13 #include "chrome/common/notification_observer.h"
13 #include "chrome/common/notification_registrar.h" 14 #include "chrome/common/notification_registrar.h"
14 15
15 class Browser; 16 class Browser;
16 class Extension; 17 class Extension;
17 class PrefService; 18 class PrefService;
18 class Profile; 19 class Profile;
19 class StatusIcon; 20 class StatusIcon;
20 class StatusTray; 21 class StatusTray;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // user disables/enables background mode via preferences. 136 // user disables/enables background mode via preferences.
136 bool in_background_mode_; 137 bool in_background_mode_;
137 138
138 // Reference to our status tray (owned by our parent profile). If null, the 139 // Reference to our status tray (owned by our parent profile). If null, the
139 // platform doesn't support status icons. 140 // platform doesn't support status icons.
140 StatusTray* status_tray_; 141 StatusTray* status_tray_;
141 142
142 // Reference to our status icon (if any) - owned by the StatusTray. 143 // Reference to our status icon (if any) - owned by the StatusTray.
143 StatusIcon* status_icon_; 144 StatusIcon* status_icon_;
144 145
146 // Ensure observed preferences are properly cleaned up.
147 PrefChangeRegistrar pref_registrar_;
148
145 DISALLOW_COPY_AND_ASSIGN(BackgroundModeManager); 149 DISALLOW_COPY_AND_ASSIGN(BackgroundModeManager);
146 }; 150 };
147 151
148 #endif // CHROME_BROWSER_BACKGROUND_MODE_MANAGER_H_ 152 #endif // CHROME_BROWSER_BACKGROUND_MODE_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/background_mode_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698