| 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 #include <algorithm> | 5 #include <algorithm> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 UpdateStatusTrayIconContextMenu(); | 255 UpdateStatusTrayIconContextMenu(); |
| 256 } | 256 } |
| 257 | 257 |
| 258 // static | 258 // static |
| 259 void BackgroundModeManager::LaunchBackgroundApplication( | 259 void BackgroundModeManager::LaunchBackgroundApplication( |
| 260 Profile* profile, | 260 Profile* profile, |
| 261 const Extension* extension) { | 261 const Extension* extension) { |
| 262 OpenApplication(AppLaunchParams(profile, extension, NEW_FOREGROUND_TAB)); | 262 OpenApplication(AppLaunchParams(profile, extension, NEW_FOREGROUND_TAB)); |
| 263 } | 263 } |
| 264 | 264 |
| 265 bool BackgroundModeManager::IsBackgroundModeActiveForTest() { | 265 bool BackgroundModeManager::IsBackgroundModeActive() { |
| 266 return in_background_mode_; | 266 return in_background_mode_; |
| 267 } | 267 } |
| 268 | 268 |
| 269 int BackgroundModeManager::NumberOfBackgroundModeData() { | 269 int BackgroundModeManager::NumberOfBackgroundModeData() { |
| 270 return background_mode_data_.size(); | 270 return background_mode_data_.size(); |
| 271 } | 271 } |
| 272 | 272 |
| 273 /////////////////////////////////////////////////////////////////////////////// | 273 /////////////////////////////////////////////////////////////////////////////// |
| 274 // BackgroundModeManager, content::NotificationObserver overrides | 274 // BackgroundModeManager, content::NotificationObserver overrides |
| 275 void BackgroundModeManager::Observe( | 275 void BackgroundModeManager::Observe( |
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 } | 749 } |
| 750 } | 750 } |
| 751 return profile_it; | 751 return profile_it; |
| 752 } | 752 } |
| 753 | 753 |
| 754 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const { | 754 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const { |
| 755 PrefService* service = g_browser_process->local_state(); | 755 PrefService* service = g_browser_process->local_state(); |
| 756 DCHECK(service); | 756 DCHECK(service); |
| 757 return service->GetBoolean(prefs::kBackgroundModeEnabled); | 757 return service->GetBoolean(prefs::kBackgroundModeEnabled); |
| 758 } | 758 } |
| OLD | NEW |